LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Hiding a userform properly!

Please take a look at the code below which my workbook
is using:
'--------------------------------------------------------
Private Sub Workbook_Open()
Userform1.Show
End Sub
'-------------------------------------------------------
Private Sub UserForm_Initialize()
MsgBox "Initialize stuff here"
Userform1.Hide
MsgBox "Okay, form1 is hidden now!"
Userform1.Show
End Sub
'--------------------------------------------------------

So....obviously this code will not work. I'm guessing that
the second call to "Userform1.Show" is causing the program
to crash. I would like to temporarily hide the form and then
make it visible again. What am I doing wrong?

thanks!


 
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
UserForm Labels not Showing Properly RyanH Excel Programming 3 December 15th 09 10:57 PM
UserForm Not Hiding Mike H. Excel Programming 1 November 28th 07 09:32 PM
Dynamically Hiding portions of a UserForm fly_fish_boy Excel Programming 0 March 14th 06 05:56 PM
UserForm from VBA macro is not getting properly unloaded Robin Hammond[_2_] Excel Programming 2 December 8th 05 09:45 AM
UserForm not hiding Tony Bender Excel Programming 4 October 9th 03 08:42 PM


All times are GMT +1. The time now is 03:36 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"