View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Worksheet Tabs Names as Dates

Pieman

Sub Sheetname_cell()
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
On Error Resume Next
sh.Name = sh.Range("A1").Value
'next lines cover duplicate names
If Err.Number 0 Then
MsgBox "Change the name of : " & sh.Name & " manually"
Err.Clear
End If
On Error GoTo 0
Next
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Mon, 6 Mar 2006 02:00:28 -0800, Pieman
wrote:

Hi, yes I thought it would require VBA programming to work. Is there a way to
do this using VB coding?

Thanks
Simon

"Tom Ogilvy" wrote:

Unless you want to use a macro, naming a sheet is a manual action.

--
Regards,
Tom Ogilvy

"Pieman" wrote in message
...
Hi

Is it possible to change the name of a worksheet tab to show the current
year and another to show the previous year? If it helps, each sheet has

the
correct year in one of the cells using the TODAY function.

Thanks
Simon