View Single Post
Old 15-08-2005, 15:32   #15
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

k, with a little more playing ...

Create a Module, as per above.

Put this code in.

Quote:
Function SheetName() As Variant
For i = 1 To Worksheets.Count
Worksheets(i).Range("A1:A1").Clear
Worksheets(i).Cells(1, 1).Value = Worksheets.Item(i).Name
Next
End Function


Sub NameSheets()
Call SheetName
End Sub
Double click on "ThisWorksheet" and add this code.
Quote:
Private Sub Workbook_Open()
Call SheetName
End Sub
This will automatically run the function when the Workbook opens and place the name of the sheet in Cell A1 on each sheet.

In addition there is a Macro which can be used when things have been changed, added or removed.
Nemesis is offline   Reply With Quote