I had the following declarations in my code and found, that AnotherFuncVar wasn't in the dictionary. Dim SomeFuncVar as Integer ' the next line should not be ignored Dim AnotherFuncVar as String