If you want to show excepts of code, then you need to provide ALL the
pertinent information. E.g. where and how are these variables defined?
What is their scope?
I suspect you need to show the whole module(s). If it's too long, then you
probably should be cutting back to something shorter and simpler for your
testing anyway.
Also. Please modernise your Basic. You shouldn't be using labels. You
should really be using "If ... Then ... EndIf".
Lastly. Please ensure that you have Option Explicit at the top of each
module.