View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How can I name Worksheet Tabs based on some king of reference?

What is "doesn't work"?

It is meant to run automatically on a calculated change in C2 value.

Did you place the code into the sheet module?

Did you check out the google search thread?

The code you have chosen is a regular macro and requires you to to run manually.


Gord

On Tue, 31 Jul 2007 12:26:09 -0700, e12762r
wrote:

Gord,
Thank You! Actually this exact one didn't work; but in searching through
these forums - I found & used this:
Sub wsname()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Name = ws.Range("B4").Value
Next ws
End Sub
But, in doing so, recognize and salute you as a true 'Excel MVP'

"Gord Dibben" wrote:

Yes

Basic event code in the worksheet module would be.................

Private Sub Worksheet_Calculate()
Me.Name = Range("C2").Value
End Sub


But I would suggest you check out this google search thread for various sets of
event code from Dave Peterson that cover several scenarios.

http://groups.google.com/group/micro...c8d6cf55155e92


Gord Dibben MS Excel MVP

On Tue, 31 Jul 2007 09:56:41 -0700, e12762r
wrote:

Does anyone know if it's possible to Name an Excel Worksheet Tab based on
some kind of reference (cell) or calculation or function?