Make sure you have not dimensioned that variable as something else, some other place. For instance, if I have a DIM a as INTEGER and set it to the value of 3, and then in some sub I try to make a = 5, The program thinks I mean let a! = 5, the SINGLE default. So in fact, I now have two variables, both named a, but with two different values. The a in the sub gets set to 5, but when the program runs back to the main, or whatever sub the a variable was DIMmed in, it retains the value 3.
Of course it could be other things, but this just came to mind. Sometimes in a lot of code, it just takes one simple continuity mistake to make a problem.
Pete