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: 120
Default Getting error with load/unload of UserForms??

My Workbook_Open() code is simply
UserForm1.Show

UserForm1 has four buttons. At this point, I'm only using CB2, which
has code
Private Sub CB2_Click()
Load UserForm2
End Sub

UserForm2_Initialize populates a ComboBox on the Form with the names
of the worksheets and then executes
Unload UserForm1
Me.Show

I select a worksheet name from the ComboBox, which executes
Private Sub ComboBox1_Change()
wkb.Worksheets(ComboBox1.Text).Visible = xlSheetVisible
wkb.Worksheets("Splash").Visible = xlSheetHidden
Unload Me
End Sub

I thought that at this point, I would be left with no code running and
looking at a worksheet. What happens, though, is that I error, and
the Debug option takes me all the way back to the UserForm1 button
code
Load UserForm2
as the bad line.

But that line was successfully executed - UserForm2 did appear and do
its thing.

How do I stop this?

Ed

 
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 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
Can't load or unload object jase[_2_] Excel Programming 1 June 9th 05 08:52 PM
Load and Unload Form commands R Avery Excel Programming 4 July 29th 04 03:16 PM
can i have VBA & forms etc load then unload? Chris A[_3_] Excel Programming 0 November 20th 03 11:14 PM


All times are GMT +1. The time now is 09:42 PM.

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"