MrExcel Publishing
Your One Stop for Excel Tips & Solutions

assigning sheet names to a combo box

Posted by Mike on January 18, 2002 5:00 PM

how do i assign sheet names to a combo box?

Posted by Bariloche on January 18, 2002 9:48 PM


Given that you have a userform called UserForm1 and a combobox called ComboBox1, the following should illustrate the solution to your question:

Sub ComboWithSheetName()
Dim sht As Worksheet

For Each sht In Worksheets
UserForm1.ComboBox1.AddItem sht.Name
Next sht


End Sub

Substitute your actual names, of course.