Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Jim. I changed both form codes to simply Hide the forms instead
of Unload them. Now my workbook works fine. I tried using the Deactivate event to unload the forms, but nothing seems to work, as far as I can tell - I had Stop statements in the codes that were supposed to unload the forms, but the code never got there. This brings up a couple of questions: (1) If the forms are hidden, is there any reason they _need_ to be Unloaded? Will the extra memory used by them hanging in there slow down my workbook? (2) Is there any way to detect if a form is still open but just hidden? Ed On Aug 21, 4:47 pm, "Jim Rech" wrote: I'd suggest that, instead of unloading UF1, you Hide it. Then try unloading it after you unload UF2. -- Jim "Ed from AZ" wrote in ooglegroups.com... 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- Hide quoted text - - Show quoted text - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform Question (Load/Unload/Show/Hide) | Excel Programming | |||
load/unload userform | Excel Programming | |||
Can't load or unload object | Excel Programming | |||
Load and Unload Form commands | Excel Programming | |||
can i have VBA & forms etc load then unload? | Excel Programming |