tab naming

  • Thread starter Thread starter duckie
  • Start date Start date
D

duckie

i am still having trouble getting the code right to change the tab
name from a cell from sheet 1 to 20 other sheets maybe if someone
could email me and i will sent the worksheet to them
 
hi
Sub renameit()
Sheets("sheet1").Name = "renamed"
End Sub

works in xp2003

regards
FSt1
 
You want to name all sheet tabs with the value of a cell on each sheet?

Sub wsname()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Name = ws.Cells(1, 1).Value
Next ws
End Sub

A1 in each sheet cannot contain any illegal characters and duplicate names are
not allowed.

Or do you want to use event code to change the sheet name when a cell value is
changed?


Gord Dibben MS Excel MVP
 

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