Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default unload userform problem


Hi,

I have some userforms and some code to get those userforms to work.
In a few userforms I end the code like:


Code:
--------------------
...
Unload Me
UserForm3.show
--------------------


And when I push the CommandButton2 (=Cancel) on this UserForm3 the
previous userform is back again.

The only problem is that the "Unload Me" command doesn't work so well.
UserForm3 comes in front of the previous userform, but the previous
userform isn't really disappearing?
Does someone know what the problem is? Thanks in advance!


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=558400

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default unload userform problem

"Me" doesn't unload until the code in "Me" is done running. I'd suggest the
you put UserForm3.show in a sub in a standard module and that you call that
sub with an OnTime macro:

Unload Me
Application.OnTime Now, "SubToShowUF3"


--
Jim
"leonidas" wrote in
message ...
|
| Hi,
|
| I have some userforms and some code to get those userforms to work.
| In a few userforms I end the code like:
|
|
| Code:
| --------------------
| ...
| Unload Me
| UserForm3.show
| --------------------
|
|
| And when I push the CommandButton2 (=Cancel) on this UserForm3 the
| previous userform is back again.
|
| The only problem is that the "Unload Me" command doesn't work so well.
| UserForm3 comes in front of the previous userform, but the previous
| userform isn't really disappearing?
| Does someone know what the problem is? Thanks in advance!
|
|
| --
| leonidas
| ------------------------------------------------------------------------
| leonidas's Profile:
http://www.excelforum.com/member.php...o&userid=35375
| View this thread: http://www.excelforum.com/showthread...hreadid=558400
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default unload userform problem


Hi Jim,

That solution worked for me! Thanks!
But I still have a problem with dragging those userforms (see
attachment).
Do you (or someone else) know how to solve that problem?
Thanks in advance!


+-------------------------------------------------------------------+
|Filename: Printscreen.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=4979 |
+-------------------------------------------------------------------+

--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=558400

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default unload userform problem


Hi,

I have solved the problem with dragging userforms over the screen.
I used "Application.ScreenUpdating = False" and then the userfor
doesn't update too. By ending the macro wit
"Application.ScreenUpdating = True" the problem was solved

--
leonida
-----------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...fo&userid=3537
View this thread: http://www.excelforum.com/showthread.php?threadid=55840

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unload Userform doesn't work here - why? rammieib Excel Programming 1 February 23rd 06 01:51 PM
Userform Question (Load/Unload/Show/Hide) RPIJG[_76_] Excel Programming 8 November 2nd 05 08:29 PM
load/unload userform Fred[_22_] Excel Programming 3 August 22nd 05 04:00 AM
unload userform from within one of that form's beforeupdate events? Andrew H[_3_] Excel Programming 1 August 10th 04 09:07 AM
XLA Unload problem Von Shean Excel Programming 1 January 10th 04 08:24 PM


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"