Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bob cook
 
Posts: n/a
Default sheet tab to equal C2 cell value

Please advise how I can make a sheet tab automatically be
named what value is in Cell C2.
TFTH,
Bob
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Address = "$C$2" Then
Me.Name = .Value
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--

HTH

RP
(remove nothere from the email address if mailing direct)


"bob cook" wrote in message
...
Please advise how I can make a sheet tab automatically be
named what value is in Cell C2.
TFTH,
Bob



  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

Try:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ExitMe
If Not Intersect(Target, Range("C2")) Is Nothing Then
Me.Name = Range("C2").Value
End If
ExitMe:
Application.EnableEvents = True
End Sub


---
HTH
Jason
Atlanta, GA

-----Original Message-----
Please advise how I can make a sheet tab automatically

be
named what value is in Cell C2.
TFTH,
Bob
.

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
How do I make a cell equal to another cells value and not it's fo. TroutKing Excel Worksheet Functions 2 January 17th 05 07:15 PM
Automatic cell increment with data from sheet 1 to sheet 2 Big G Excel Worksheet Functions 2 December 20th 04 06:59 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 03:06 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 06:57 PM


All times are GMT +1. The time now is 04:48 AM.

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

About Us

"It's about Microsoft Excel"