LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Linking sheet tab names to cells

Hi
you'll need an event procedure (see
http://www.cpearson.com/excel/events.htm for more details): Put the
following code in your worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
application.enableevents = false
With Target
If .Value < "" Then
Me.Name = .value
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"kevin" schrieb im Newsbeitrag
...
Hi,

Do you know a way in VBA to change the name of a sheet by linking it

to a cell. ie if cell A1 is "Monday" the name on the sheet tab is
Monday. but will change if i put Tuesday in A1

Regards
Kevin


 
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
Linking worksheets in the same workbook by names not cells rohobby Excel Discussion (Misc queries) 1 April 16th 09 04:15 AM
Linking tab names to a cell in the sheet Hankjam[_2_] Excel Discussion (Misc queries) 1 July 25th 08 09:26 PM
Linking Cells accross Workbooks using Column Names Jimmy944 Excel Discussion (Misc queries) 0 July 17th 08 10:23 AM
Sheet names linking to cell Tom Excel Discussion (Misc queries) 4 September 27th 07 09:09 AM
Linking Cells to a file that changes names Carlmac4 Excel Discussion (Misc queries) 1 October 9th 06 07:01 PM


All times are GMT +1. The time now is 10:52 PM.

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"