#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Cell and tab naming

Is there any way to make a tab take on the name of a given cell automatically?

(Ex. If 1 enter Joe in A-1 a specific tab will be named Joe)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Cell and tab naming

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Me.Name = .Value
End With
End If

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

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"bpoland58" wrote in message
...
Is there any way to make a tab take on the name of a given cell
automatically?

(Ex. If 1 enter Joe in A-1 a specific tab will be named Joe)



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
tab naming from a set cell duckie Excel Discussion (Misc queries) 1 October 3rd 07 09:57 AM
Naming a cell Yan Cossette Excel Worksheet Functions 8 September 23rd 06 07:40 PM
Naming The Tabsheet from a cell JackR Excel Discussion (Misc queries) 3 March 14th 06 04:16 PM
What is wrong with naming a cell as c? vezerid Excel Discussion (Misc queries) 4 January 31st 06 08:57 PM
Naming a cell mike Excel Worksheet Functions 2 January 12th 05 11:31 PM


All times are GMT +1. The time now is 06:01 AM.

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"