I think the problem is that you are closing the user form with this line:
Unload Me
Or something similar. This will KILL the user form, and therefor, all variables contained in it. To avoid this, only Hide it, with
Me.Hide
You should be set.
Juan Pablo G.
Thanks for quick reply. I AM using Me.Hide and still having the problem.
standard module to store the settings, but apparently Excel treats each showing of the form as a separate run and therefore reinitializes all variables.
Really ? Where did you put the Public Variables ? they should be in a standard module, not in the UserForm's.
Juan Pablo G. for quick reply. I AM using Me.Hide and still having the problem.
Well things don't aways work the way they should, what I would do, is put each one of the objects "values" in a cell on a worksheet that is not used or in a place not seen, as in AB3000 etc.
So as the form is loaded, take the values off the worksheet, (blanks or empty the first time) and write them to those cells as they are changed.
At least that is a work around to this problem.
If you supply the exact formula and the cell it's in (important for my solution) I can give you a result
I used to have hellatious problems with scope of variables when using userforms. I think I got round the problem by using Class Modules as containers for the data. Really ? Where did you put the Public Variables ? they should be in a standard module, not in the UserForm's. for quick reply. I AM using Me.Hide and still having the problem. :