Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Member
 
Posts: 54
Default Linking Tab Name to a Cell

I have been unsuccessful in my search but I am sure there is an easy way to change the tab name to the value in cell. How do I do that?

Thanks
Dave
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 194
Default Linking Tab Name to a Cell

Dave

http://www.contextures.com/xlfaqFun.html#SheetName

Mike Rogers

"Dave H" wrote:


I have been unsuccessful in my search but I am sure there is an easy way
to change the tab name to the value in cell. How do I do that?

Thanks
Dave




--
Dave H

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,090
Default Linking Tab Name to a Cell

Dave
The simple answer is:
ActiveSheet.Name = Range("A1").Value
But this is VBA code so it begs the question: When do you want this name
change to happen?
Your post subject mentions "Linking". Do you want this to happen
automatically whenever cell A1 (in my example) changes content?
If so, then this macro will do that. Note that this macro is a sheet macro
and must be placed in the sheet module of the sheet in question. To access
that module, right-click on the sheet tab. select View Code, and paste this
macro into that module. "X" out of the module to return to your sheet. HTH
Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Not Intersect(Target, Range("A1")) Is Nothing Then _
Me.Name = Range("A1").Value
End Sub

"Dave H" wrote in message
...

I have been unsuccessful in my search but I am sure there is an easy way
to change the tab name to the value in cell. How do I do that?

Thanks
Dave




--
Dave H



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Linking Tab Name to a Cell

Only through VBA, not via any Excel Function.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
On Error Resume Next
Me.Name = Range("A1").Text
On Error GoTo 0
End If
End Sub

This is event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Make a change in A1 and sheet name will change.


Gord Dibben MS Excel MVP



On Wed, 29 Nov 2006 15:45:00 -0800, Mike Rogers
wrote:

Dave

http://www.contextures.com/xlfaqFun.html#SheetName

Mike Rogers

"Dave H" wrote:


I have been unsuccessful in my search but I am sure there is an easy way
to change the tab name to the value in cell. How do I do that?

Thanks
Dave




--
Dave H


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
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
linking a cell containing text to another cell containing text / data gin2000 Excel Discussion (Misc queries) 5 May 19th 06 09:08 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
linking to a cell within a text cell or comment BlueJ2005 Excel Worksheet Functions 0 May 11th 06 10:36 PM
Linking a cell to another workbook cell based on a variable name Brian Excel Discussion (Misc queries) 6 June 1st 05 11:54 PM


All times are GMT +1. The time now is 03:24 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"