There's another 'On Error Resume Next' in Function GetStringValue. I'd remove that and see what happens. By the way, you're not testing the result from GetStringValue, just assuming it all ran OK. Note that it can return a value "Key Not found" instead of the Key's value.

Saying all that I'd still expect the MsgBox to be executed.