Populate ComboBox with Worksheet Names
Your welcome and thanks for the feedback
"Allen" wrote:
That did the trick, thank you so much!
"Mike H" wrote:
Hi,
Try this
Private Sub UserForm_Initialize()
For x = 1 To Worksheets.Count
ComboBox1.AddItem Sheets(x).Name
Next
End Sub
Mike
"Allen" wrote:
I'm trying to populate a combobox in a userform with the names of the
worksheets in my spreadsheet.
I'm guessing I'll just need to put it in a userform_initialize statement
with a For Each / Next loop, but am having trouble getting it to work.
Any syntax suggestions are much appreciated! Thanks
|