View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dr. Stephan Kassanke Dr. Stephan Kassanke is offline
external usenet poster
 
Posts: 24
Default Sheet names in a form dropdown


"Rob Hargreaves" schrieb im Newsbeitrag
...
Hi I have created a form and I would like to have a drop down on the form
populated with the names of each sheet in my workbook (Other than the
sheet named "Menu")

Can someone tell me how to do this.

Thanks

Rob


Hi rob,

try the following in the Initialize event of your form

Private Sub UserForm_Initialize()
Dim mySheet As Worksheet
For Each mySheet In Worksheets
If mySheet.Name < "Menu" Then

myDropDownCtrlName.AddItem mySheet.Name

End If
Next
End Sub


Stephan