I have a public variant type dynamic array that contains text descriptions of the possible settings that my forms and functions can pull from. The Workbook_Open() event calls a Friend sub that initializes and assignes values to the array when the work book opens. When I reset the project for debugging purposes, it of course resets all of my public variables. So in my user form, which requires the setting descriptions so it can place them in a combo box for the user to pick from, I placed the following statement in the UserForm_Initialize() event:
My thinking was that when the form resets, and the variables along with it, they would contain an Empty value. So the IsEmpty function should return TRUE. However, it does not. So the question is, why does it return FALSE?
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
Code:
[COLOR=darkgreen]'Make sure public variables are intitialized. If the project has been reset they will have been lost[/color]
[COLOR=darkblue]If[/color] IsEmpty(vntHistoryDescrip) [COLOR=darkblue]Then[/color]: [COLOR=darkblue]Call[/color] ThisWorkbook.InitializeVariables
My thinking was that when the form resets, and the variables along with it, they would contain an Empty value. So the IsEmpty function should return TRUE. However, it does not. So the question is, why does it return FALSE?
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]