Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rename worksheet tabs fix me Excel Worksheet Functions 3 March 12th 13 01:19 PM
Rename Worksheet From Cell Data navel151 Excel Worksheet Functions 6 February 22nd 10 04:39 PM
I want to rename my worksheet tabs... Dr. Darrell Excel Discussion (Misc queries) 5 July 13th 09 03:05 PM
Rename all existing worksheet tabs MikeM Excel Discussion (Misc queries) 14 October 20th 06 03:29 AM
Rename a Worksheet on Input of Value in Cell John Excel Worksheet Functions 1 August 24th 06 05:29 PM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"