View Single Post
Old 15-08-2005, 13:07   #9
Nemesis
Inactive
 
Join Date: Jun 2003
Location: Surrey
Age: 59
Services: Virgin stuff
Posts: 6,407
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Send a message via MSN to Nemesis
Re: Excel help Sheet Name...linking into Spreadsheet

If you created a Module and add this code to it, the sheet names will appear in the first column on Sheet1.

Quote:
Function SheetNames() As Variant
Dim SheetN As String
Dim SheetN2() As Variant
Dim SheetCount As Integer
Dim x As Integer

Application.Volatile
x = 1
SheetCount = Worksheets.Count
Worksheets(1).Range("A:A").Clear
For x = 1 To SheetCount
With Worksheets
SheetN = .Item(x).Name
End With
ReDim Preserve SheetN2(SheetCount)
SheetN2(x) = SheetN
Worksheets(1).Cells(x, 1).Value = SheetN2(x)
Next
End Function

Sub SheetName()
Call SheetNames
End Sub
It also creates a Macro called Sheetname that can be run to update the list if any are added or taken away.

It's basic, but does the job.
Nemesis is offline   Reply With Quote