Dear All,
I hope you can help, i need some code which will give me a list of all the worksheet tab names in my workbook, the reason for this is on the first sheet, i want to create an index.
I can just about get it to give me the name of the active worksheet but i want them all in a list.
I hope someone can help.
Thanks Emma
#2
Sub ListWorkBooks()
Dim I As Integer
' Find first worksheet and select it
Excel.Worksheets.Item(1).Select
' Start in cell A1
Range("A1").Select
'Loop through each worksheet
For I = 1 To Worksheets.Count
' Place the Worksheet name in the active cell
ActiveCell.Value = Worksheets(I).Name
'Offset to next cell below
ActiveCell.Offset(1, 0).Select
Next I
End Sub
------------------
Regards
John Finlay
Dim I As Integer
' Find first worksheet and select it
Excel.Worksheets.Item(1).Select
' Start in cell A1
Range("A1").Select
'Loop through each worksheet
For I = 1 To Worksheets.Count
' Place the Worksheet name in the active cell
ActiveCell.Value = Worksheets(I).Name
'Offset to next cell below
ActiveCell.Offset(1, 0).Select
Next I
End Sub
------------------
Regards
John Finlay