Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re Name a Worksheet as a Date Format
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re Name a Worksheet as a Date Format
Hi John
try strSheetName = Format(Worksheets(ActiveSheet.Name).Range("a8"),"m mddyyyy") apply the format code to your needs -- Regards Frank Kabel Frankfurt, Germany John D O'Connor wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re Name a Worksheet as a Date Format
Thanks Ron, works a treat
Rgds John "Ron de Bruin" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default date format for a new worksheet | Setting up and Configuration of Excel | |||
Convert worksheet string name to date format in cell | Excel Worksheet Functions | |||
Why all the cells format on my worksheet change to date automatica | Excel Discussion (Misc queries) | |||
Date format changes in mail merge using Excel worksheet as data | Excel Discussion (Misc queries) | |||
Excel 2000 worksheet where I want to convert date format | Excel Discussion (Misc queries) |