PC Review


Reply
Thread Tools Rate Thread

Cell and tab naming

 
 
bpoland58
Guest
Posts: n/a
 
      13th Dec 2007
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      13th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:C9EA442D-2419-46A3-806A-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Naming Bruce A. Julseth Microsoft Excel Programming 8 4th Jan 2010 03:47 PM
Cell naming using cell references (VBA? Offset?) StephenT Microsoft Excel Misc 2 24th Jun 2009 07:06 PM
How do I control the cell reference when naming a cell in a macro =?Utf-8?B?R2xlbm4=?= Microsoft Excel Programming 2 22nd May 2007 08:41 PM
Naming a cell mike Microsoft Excel Worksheet Functions 2 12th Jan 2005 11:31 PM
How to use the content of one cell for naming another cell Itay Microsoft Excel Worksheet Functions 4 4th Apr 2004 07:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:04 PM.