View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Re Name a Worksheet as a Date Format

Hi John

Use the Format function

ActiveSheet.Name = Format(Range("B1"), "dd-mm-yy")

ActiveSheet.Name = Format(Now, "dd-mm-yy h-mm-ss")


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"John D O'Connor" wrote in message ...
Using a Macron how can you rename a Worksheet using a Date format. I have a
Macro that re-names a new Worksheet with whatever Date is in a certain cell,
however the worksheet re-names not in Date format but in numeric format.

Anyone suggest the code that I should insert? My current code is as below

strSheetName = Worksheets(ActiveSheet.Name).Range("a8")

Where A8 is the document date

Thanks

John