Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When a form is loaded using the Show method, the variables contained within
the underlying code for the form and for the controls are all temporary. Once the form is unloaded, all values of those variables are dumped from memory. As Rick suggested, during design mode, you can use the View Code to access the UserForm code module, where you can declare any variables at the top of the module that you want to apply to any of the procedures within the form and the controls it contains. Again, any variable declared within a UserForm, its procedures and its controls' procedures are temporary. They only last for the active life of the UserForm, although they will re-initialize each time the form is loaded. "DoctorG" wrote: I wish to declare temporary variables that will be declared when a form is shown, will be visible to all form subroutines and "deleted" (so that memory is released) after the form is hidden again. Is this possible? If not what is the best way to declare variables visible to all form subroutines? Public....???? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
user form for dates, used in variables | Excel Programming | |||
sharing variables between form and module code | Excel Programming | |||
Passing variables between a form and macro | New Users to Excel | |||
Passing variables between a form and macro | New Users to Excel | |||
variables in a form | Excel Programming |