#1   Report Post  
~Jeff~
 
Posts: n/a
Default Sheet tab name

Is there a way to set the spreadsheet up so that the value in cell A4
appears as the sheet tab name?

--
~Jeff~
[Microsoft Windows XP Pro,Office 2000]


  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

Only with VBA code.

Sub AAA()
ActiveSheet.Name = ActiveSheet.Range("A4").Text
End Sub

or you can use an event procedure to automate this. In the code
module for the worksheet in question, use

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$4" Then
Me.Name = Target.Text
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"~Jeff~" wrote in message
...
Is there a way to set the spreadsheet up so that the value in
cell A4
appears as the sheet tab name?

--
~Jeff~
[Microsoft Windows XP Pro,Office 2000]




  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
you have to use VBA for this. e.g. put the following code in your workshete
module

Private Sub Worksheet_Change(ByVal Target As Range)
if target.address="$A$4" then
on error resume next
application.enableevents=false
me.name=target.value
application.enableevents=true
end if
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

~Jeff~ wrote:
Is there a way to set the spreadsheet up so that the value in cell A4
appears as the sheet tab name?



  #4   Report Post  
Andy Brown
 
Posts: n/a
Default

"~Jeff~" wrote in message
...
Is there a way to set the spreadsheet up so that ...


Yes, with event code (if you mean "so that the sheet name becomes whatever's
in A4" & not the other way around).

Rightclick the sheet tab, click "View Code" ; then paste the following into
the worksheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$4" Then Exit Sub
On Error GoTo 100:
ActiveSheet.Name = Target
Exit Sub
100:
MsgBox "Cannot rename sheet."
End Sub


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
Transfer data from sheet to sheet Jenn Excel Discussion (Misc queries) 4 January 20th 05 03:07 PM
Linking sheets to a summary sheet in workbook gambinijr Excel Discussion (Misc queries) 4 December 16th 04 08:13 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


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