ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error loading forms (https://www.excelbanter.com/excel-programming/334818-error-loading-forms.html)

Mats Samson

Error loading forms
 
Hello!
Is really ALL information flushed when a form is unloaded?
I have a small Menu-form loading another form and setting certain parameters.
The 1st form is unloaded when the second is loaded and shown.
If I exit the second form (and unloading it), loading (via the code) the
Menu-form again and select to load a new instance of the second form
(evetually with different parameters), the program hangs at the loading with
a white empty form-frame and will never complete.
Why?

Best regards
Mats

jjk

Error loading forms
 
Hi Mats,

Are you using global variables or arrays. These get reset when a form
is displayed.
http://support.microsoft.com/default...b;en-us;169621
I am sure you are setting public variables in the form before showing
it. You might want to add some sanity error checks to identify the
problem.

This being said.
Why dont you examine the design of your code calling the forms. You
might want to load all the forms (Load frm). Then show and hide your
forms as required without unloading them (frm.show frm.hide). You can
unload the form when you are done with the use of the menu.

Regards,
Jayant



All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com