Listboxes - populate with all worksheet names

B

bluegnu

Hello,

I would like to populate a forms listbox with all the sheetnames in my
workbook. I would also like to exclude certain sheet names from the
list.

As I add sheets, I would like this to be picked up by the code and
added to the listbox.

Is this possible?
 
B

bluegnu

I have worked this out now. I used:


Code
-------------------
Dim wbs As Worksheet

For Each wbs In Worksheets
If wbs.Name <> "ignore_sheet" Then
ListBox1.AddItem wbs.Name
End If
Nex
 

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

Top