Retaining values on multiple VBA forms.


Posted by Ron on May 08, 2001 4:50 PM

I have multiple VBA forms that collect date and insert the data into a number of sheets that are used as reports.
I would like to know if anyone knows of a way to keep the data entered on each form intact while hiding and showing the various forms. The problem I'm having is the user fills out some textboxes on form A and goes to form B. But if the user returns to form A through code which hides and shows the forms, the textbox is empty.
Any ideas appreciated!



Posted by Dax on May 09, 2001 2:15 AM

Hello,

Are you using the keyword Unload Userform are are you using something like Userform1.Hide? If you are simply hiding the form then it will remain in memory and anything entered onto any form will remain. If you are unloading the form then it will be removed from memory and then reloaded (blank) when you show the form.

HTH,
Dax.