B
Bobby
Hi! Need a little help please.
Question, how do I terminate/close the listbox after the user made one
selection?
My code filling up a the listbox and calling a Userform1
Thank's ahead for any pointers.
Sub slist()
i = 1
For Each ws In Worksheets
UserForm1.ListBox1.AddItem (Worksheets(i).Name)
i = i + 1
Next ws
UserForm1.Show
End Sub
Userform1 code:----------------------------------------
Private Sub ListBox1_Click()
Sheets(UserForm1.ListBox1.Value).Select
End Sub
Question, how do I terminate/close the listbox after the user made one
selection?
My code filling up a the listbox and calling a Userform1
Thank's ahead for any pointers.
Sub slist()
i = 1
For Each ws In Worksheets
UserForm1.ListBox1.AddItem (Worksheets(i).Name)
i = i + 1
Next ws
UserForm1.Show
End Sub
Userform1 code:----------------------------------------
Private Sub ListBox1_Click()
Sheets(UserForm1.ListBox1.Value).Select
End Sub