Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename active sheet
I am trying to rename the active sheet from a cell in the sheet. Th
cell has a date. The cell has a date format of mm-dd-yy which is how want the sheet to be renamed. When using Selection.Copy the dat format is mm/dd/yy. So when i attempt to rename the sheet it cannot b renamed since the date format has special characters. Selection.Copy ActiveSheet.Select 'ActiveSheet.Name = "01-05-04" ActiveSheet.Name = Selection ActiveSheet.Name = "01-05-04" is the correct format but cannot be use since it will be in a Loop. Using Selection formats the date a mm/dd/yy. Is there a way to format Selection as mm-dd-yy -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename active sheet
Try this
ActiveSheet.Name = Format(Range("A1"), "mm-dd-yy") -- Regards Ron de Bruin http://www.rondebruin.nl "lumaduc " wrote in message ... I am trying to rename the active sheet from a cell in the sheet. The cell has a date. The cell has a date format of mm-dd-yy which is how I want the sheet to be renamed. When using Selection.Copy the date format is mm/dd/yy. So when i attempt to rename the sheet it cannot be renamed since the date format has special characters. Selection.Copy ActiveSheet.Select 'ActiveSheet.Name = "01-05-04" ActiveSheet.Name = Selection ActiveSheet.Name = "01-05-04" is the correct format but cannot be used since it will be in a Loop. Using Selection formats the date as mm/dd/yy. Is there a way to format Selection as mm-dd-yy? --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i rename a sheet if the rename tab is inactive? | Excel Worksheet Functions | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
Move data to new sheet - rename sheet based on criteria ? | Excel Discussion (Misc queries) | |||
Rename active sheet | Excel Programming | |||
Rename Active Sheet | Excel Programming |