Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create list from Excel Worksheet Tabs 1

Status
Not open for further replies.

cariengon

Technical User
Joined
Mar 18, 2002
Messages
283
Location
US
I can't find anything in MS Help, so I was wondering if anyone knew how to create a master list of all tabs that are in a MS Excel Workbook.

Thanks in Advance!
 
If you want to populate a range of cell in a work sheet with the names try the following code :

Sub ListSheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
Range("A1").Offset(x, 0) = ws.Name
x = x + 1
Next
End Sub

The above will populate the active sheet with a list of sheets in the active workbook, starting at A1. That of course can be changed to suit. The code could be changed to populate a list/combo box with teh data.

A.C.
 
Thanks!!! It was exactly what I was looking for! [bigcheeks]
 
[bigcheeks]...

Pssssssssssssst... you forgot to "issue a STAR".

Actually it appears you're not yet aware of this "accepted practice" at Tek-Tips. It's the "proper" means of showing recognition and appreciation for the contributor's help.

Issuing a STAR involves simply clicking on the "Click here to mark this post as a helpful or expert post!" - located in the lower-left-corner of the contributor's posting.

The STARS also serve as "beacons" for other "browsers" who are "on the lookout" for useful tips and solutions.

PLEASE do NOT issue me a STAR for this "reminder". I want to earn stars in the normal way. Thanks. :-)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top