Populating List box with tab/worksheet names

  • Thread starter Thread starter Nick O
  • Start date Start date
N

Nick O

Is there a way to populate a list box embedded in a worksheet with the names
I've assigned to the worksheets/tabs? Thanks!
 
Hit a snag. It's throwing me an error when I use "Me" and when I remove that
it gives me an "object required" error. here's the code:

Sub Auto_Open()

Dim Sh As Worksheet
For Each Sh In Sheets
Me.RegionSelect.AddItem (Sh.Name) ' RegionSelect is the name of the list
box embeded in the sheet
Next Sh
Application.ScreenUpdating = False
Application.Run "Format"
End Sub
 
Sorry, just thought of one more related question. How would I handle the
need to populate the list box with only certain sheet names? Have the code
put the names in a cell range and then link the list box to just the part of
the range I needed? Thanks!
 

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