Listbox

B

Bobby

Hello! 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top