Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename Worksheet Tabs per Cell Content
Hello,
I'd like to be able to rename my worksheet tabs based on the contents of a cell within that worksheet (same cell in each worksheet). Any suggestions? TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename Worksheet Tabs per Cell Content
Try something like this
dim aWS as worksheet on error resume next for each aWS in activeworkbook.worksheets aws.name = aws.cells(1,1).value next aws on error goto 0 HTH, Barb Reinhardt "JEFF" wrote: Hello, I'd like to be able to rename my worksheet tabs based on the contents of a cell within that worksheet (same cell in each worksheet). Any suggestions? TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename Worksheet Tabs per Cell Content
From Ron de Bruin comes this code.
Sub Sheetname_cell() Dim sh As Worksheet Application.ScreenUpdating = False For Each sh In ThisWorkbook.Worksheets On Error Resume Next sh.Name = sh.Range("A1").Value 'next lines cover duplicate names If Err.Number 0 Then MsgBox "Change the name of : " & sh.Name & " manually" Err.Clear End If On Error GoTo 0 Next Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Tue, 15 May 2007 09:52:01 -0700, JEFF wrote: Hello, I'd like to be able to rename my worksheet tabs based on the contents of a cell within that worksheet (same cell in each worksheet). Any suggestions? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
rename worksheet tabs | Excel Worksheet Functions | |||
Rename Worksheet From Cell Data | Excel Worksheet Functions | |||
I want to rename my worksheet tabs... | Excel Discussion (Misc queries) | |||
Rename all existing worksheet tabs | Excel Discussion (Misc queries) | |||
Rename a Worksheet on Input of Value in Cell | Excel Worksheet Functions |