Function to List an Excel Workbook's Sheet Names

K

KymY

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 [email protected] - 01April2005 (& no fooling!))
 
P

Peter Rooney

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
 
Top