I'm a novice VBA programmer and I have a few questions about userforms and memory management.
I understand that Load and Unload put a userform into or out of memory and that Hide/Show conceals or reveals a form already in memory (and loads/unloads, if necessary).
My questions, however, are:
1. In a Userform_Terminate () sub, is it necessary to put an Unload Me command or is it unnecessarily redundant?
2. Imagine I have two userforms - 1 and 2. Userform1 is filled out and a NEXT command button is clicked which hides userform1 and shows userform2. Userform2 is filled out and a SAVE command button unloads userform2 when clicked using an Unload Me command. Will userform1 still be loaded into memory? I'm just wondering if I need to place both an Unload userform1 and an Unload userform2 into the SAVE command button's object code?
3. In a similar vein, imagine the user goes to userform2, but does not click the SAVE button, but decides to close the form instead by clicking on the 'X' in the upper right hand corner of the form window. Will userform1 still be loaded into memory?
I understand that Load and Unload put a userform into or out of memory and that Hide/Show conceals or reveals a form already in memory (and loads/unloads, if necessary).
My questions, however, are:
1. In a Userform_Terminate () sub, is it necessary to put an Unload Me command or is it unnecessarily redundant?
2. Imagine I have two userforms - 1 and 2. Userform1 is filled out and a NEXT command button is clicked which hides userform1 and shows userform2. Userform2 is filled out and a SAVE command button unloads userform2 when clicked using an Unload Me command. Will userform1 still be loaded into memory? I'm just wondering if I need to place both an Unload userform1 and an Unload userform2 into the SAVE command button's object code?
3. In a similar vein, imagine the user goes to userform2, but does not click the SAVE button, but decides to close the form instead by clicking on the 'X' in the upper right hand corner of the form window. Will userform1 still be loaded into memory?