View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Name worksheet tabs with a date in a cell

Since "won't work" is none too descriptive, I will assume that your macro throws
an error.

Ususally due to the illegal / marks in a date.

Try this macro.

Sub wsname()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Name = Format((ws.Cells(1, 1).Value), "mmm dd yyyy")
Next ws
End Sub


Gord Dibben MS Excel MVP

On Sun, 24 Jun 2007 14:58:02 -0700, JackR
wrote:

I am using this macro for naming my tabs with the content of cell A1 on each
worksheet, my problem is that it wont work with a date, and I need to have a
date in cell A! to name each tab with that date. Any ideas would help.