Worksheet Labels as Combo Box Selections

  • Thread starter Thread starter pdberger
  • Start date Start date
P

pdberger

Good afternoon --

I would like to set up a combo box using the labels of the worksheets as the
options from which the user selects. So, if I had a contiguous set of
worksheets -- Smith, Jones, Thompson, for example -- how could I do that?

Can anyone help with how to do that?

Thanks in advance.
 
If you are using a UserForm and a ComboBox in the UserForm assign the
following macro to the user form:

Private Sub UserForm_Initialize()
For Each ws In ActiveWorkbook.Worksheets
ComboBox1.AddItem ws.Name
Next
End Sub

regards
reklamo
 

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

Back
Top