MisterExcellent
New Member
- Joined
- Apr 21, 2011
- Messages
- 46
Hello all!
How can i show then unload userform1 and show userform2 correctly?
The first userform should be shown, if the listbox is filled.
If the listbox is filled and the userform1 is shown, i can unload this userform and show userform2 with a commandbutton.
If there are no data (the listbox is empty) it should unload and show the second userform.
My solution doesn't work:
I look forward to your approach..
Bye for now..
Version: Excel2003
How can i show then unload userform1 and show userform2 correctly?
The first userform should be shown, if the listbox is filled.
If the listbox is filled and the userform1 is shown, i can unload this userform and show userform2 with a commandbutton.
If there are no data (the listbox is empty) it should unload and show the second userform.
My solution doesn't work:
Code:
If ListBox1.ListCount = 0 Then UserForm1.Hide [COLOR=DarkOrange]And Userform2.Show[/COLOR]
Application.OnTime Now + TimeValue("00:00:02"), "ThisWorkbook.Close"
Else
Me.Show
End If
End Sub
Bye for now..
Version: Excel2003
Last edited: