-
Does anyone know how I can reset an integer variable (or any numeric variable come to that) to it's initial state i.e. the state it was at run time? I don't want to set it to "0".
A string can be cleared by: string = "", but this can't be used for an integer, neither can the "Null" command.
Thanks
-
0 is the unitialised state for all numric variables, so settign it to 0 is effectively resetting it
- gaffa
-
How about setting it to empty. Can that be used for integers?
I don't have VB to hand...
-
Try vbNullString.
Code:
string = vbNullString
It is also very simple to make 0 = Nothing, but you said you did not want to use 0.