Can the name of a worksheet reference a given cell in that worksheet so that
the cell name is also the name of the worksheet? Note that the cell drives
the worksheet name and not vice versa. Thanks.
-BrianYou need VBA for that.
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = quot;A1quot;
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 Phillips
(remove nothere from email address if mailing direct)
quot;brianTmcnamaraquot; gt; wrote in message
news
gt; Can the name of a worksheet reference a given cell in that worksheet so
that
gt; the cell name is also the name of the worksheet? Note that the cell
drives
gt; the worksheet name and not vice versa. Thanks.
gt;
gt; -Brian
gt;
- Sep 10 Mon 2007 20:39
quot;Naming a worksheetquot; question
close
全站熱搜
留言列表
發表留言