ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User form closes after opening another one -- Problem with "Unload Me"? (https://www.excelbanter.com/excel-programming/380726-user-form-closes-after-opening-another-one-problem-unload-me.html)

[email protected]

User form closes after opening another one -- Problem with "Unload Me"?
 
Hello,

I am having trouble with some user forms I made...It seems when I
navigate through the user forms I get a undesired result... When I have
a user form that loads another user form I have a button inside of that
user form that allows it navigate back to original (before it was sent
to the new opened one). This works fine until the userform is closed
and reopened by pressing the same button again...Excel just seems to
think it is closing every userform that is opened. I have no idea how
to correct this problem so I am hoping someone out there knows how to
correct this problem...the example below will help better explain the
situation.

Form Forward Motion
-------------------------------
UserForm1 (Parent)
|--- UserForm2 (Child)
|--- UserForm 3 (Grandchild)

Form Backward Motion
-------------------------------
UserForm3 (Grandchild)
|--- UserForm2 (Child)
OR
|------------- UserForm 3 (Parent)


UserForm3 has the option of going back to UserForm1 & UserForm2...this
works correctly until it is ran a second time (meaning no form is
closed)...Excel seems to crap out after it has loaded 3 user forms and
has closed each one.

Here is the scenario I am doing...

From UserForm1 I am loading Userform2
From UserForm2 I am loading Userform3


When I am finished using UserForm3 I go back to UserForm2 and from
UserForm2 I can go back to UserForm1...Excel unloads everything if I
decide to go back into UserForm1 or UserForm2 from UserForm2.

I have tried the code below...

Unload Me (Closes the current userform)
Show.Userform# (Opens the new userform)

I have also tried getting rid of the "ME" part in the code to make it
relative towards the navigation but it is failing to produce the
desired result...

Any help is greatly appreciated!!!


[email protected]

User form closes after opening another one -- Problem with "Unload Me"?
 
* * * CORRECTION TO MESSAGE * * *

When I am finished using UserForm3 I go back to UserForm2 and from
UserForm2 I can go back to UserForm1...Excel unloads everything if I
decide to go back into UserForm1 or UserForm2 from UserForm3.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * *

wrote:
Hello,

I am having trouble with some user forms I made...It seems when I
navigate through the user forms I get a undesired result... When I have
a user form that loads another user form I have a button inside of that
user form that allows it navigate back to original (before it was sent
to the new opened one). This works fine until the userform is closed
and reopened by pressing the same button again...Excel just seems to
think it is closing every userform that is opened. I have no idea how
to correct this problem so I am hoping someone out there knows how to
correct this problem...the example below will help better explain the
situation.

Form Forward Motion
-------------------------------
UserForm1 (Parent)
|--- UserForm2 (Child)
|--- UserForm 3 (Grandchild)

Form Backward Motion
-------------------------------
UserForm3 (Grandchild)
|--- UserForm2 (Child)
OR
|------------- UserForm 3 (Parent)


UserForm3 has the option of going back to UserForm1 & UserForm2...this
works correctly until it is ran a second time (meaning no form is
closed)...Excel seems to crap out after it has loaded 3 user forms and
has closed each one.

Here is the scenario I am doing...

From UserForm1 I am loading Userform2
From UserForm2 I am loading Userform3


When I am finished using UserForm3 I go back to UserForm2 and from
UserForm2 I can go back to UserForm1...Excel unloads everything if I
decide to go back into UserForm1 or UserForm2 from UserForm2.

I have tried the code below...

Unload Me (Closes the current userform)
Show.Userform# (Opens the new userform)

I have also tried getting rid of the "ME" part in the code to make it
relative towards the navigation but it is failing to produce the
desired result...

Any help is greatly appreciated!!!



[email protected]

User form closes after opening another one -- Problem with "Unload Me"?
 
* * Update * *

After much thought I figured I would do a detect & repair on
Excel...The problem no longer exsists with the navigation but a new one
arises...

1.) Why would Excel crap out like this?
2.) Is there anything I can do to prevent this type of behavior for
future use by end-users?
3.) Is this issue caused by the temporary files mentioned in the URL
below?

http://groups.google.com/group/micro...53551b8b6247e4



wrote:
* * * CORRECTION TO MESSAGE * * *

When I am finished using UserForm3 I go back to UserForm2 and from
UserForm2 I can go back to UserForm1...Excel unloads everything if I
decide to go back into UserForm1 or UserForm2 from UserForm3.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * *

wrote:
Hello,

I am having trouble with some user forms I made...It seems when I
navigate through the user forms I get a undesired result... When I have
a user form that loads another user form I have a button inside of that
user form that allows it navigate back to original (before it was sent
to the new opened one). This works fine until the userform is closed
and reopened by pressing the same button again...Excel just seems to
think it is closing every userform that is opened. I have no idea how
to correct this problem so I am hoping someone out there knows how to
correct this problem...the example below will help better explain the
situation.

Form Forward Motion
-------------------------------
UserForm1 (Parent)
|--- UserForm2 (Child)
|--- UserForm 3 (Grandchild)

Form Backward Motion
-------------------------------
UserForm3 (Grandchild)
|--- UserForm2 (Child)
OR
|------------- UserForm 3 (Parent)


UserForm3 has the option of going back to UserForm1 & UserForm2...this
works correctly until it is ran a second time (meaning no form is
closed)...Excel seems to crap out after it has loaded 3 user forms and
has closed each one.

Here is the scenario I am doing...

From UserForm1 I am loading Userform2
From UserForm2 I am loading Userform3


When I am finished using UserForm3 I go back to UserForm2 and from
UserForm2 I can go back to UserForm1...Excel unloads everything if I
decide to go back into UserForm1 or UserForm2 from UserForm2.

I have tried the code below...

Unload Me (Closes the current userform)
Show.Userform# (Opens the new userform)

I have also tried getting rid of the "ME" part in the code to make it
relative towards the navigation but it is failing to produce the
desired result...

Any help is greatly appreciated!!!




All times are GMT +1. The time now is 08:14 AM.

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