Function to List an Excel Workbook's Sheet Names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I print this information (in File Properties Contents) or copy-paste
the workbook's list of Sheets Contained (by name) into a new worksheet - I
have a workbook with 50 odd sheets in it (1 for each employee under our
voluntary benefits plan) and I just want to copy a list of these (row-by-row)
into another worksheet, to send each e/ee a mail-merged letter outlining
proposed changes to the plan

(From (e-mail address removed) - 01April2005 (& no fooling!))
 
KymY

How about this bit of VBA?

Sub ASheetList()
Dim Count As Integer
For Count = 1 To ActiveWorkbook.Sheets.Count
Range("A1").Offset(Count, 0).Formula =
ActiveWorkbook.Sheets(Count).Name
Next
End Sub

Hope this helps

Pete
 

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