Rename active sheet

L

lumaduc

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Rename & Colour Sheet Q 2
System Dates 8
Vba Date$ 1
Finding Date in an overseas format 20
VB Date Format 8
Excel 2003 Dates - Strange behaviour 2
Pasting a date to a cell from UserForm 2
Copy a Sheet to New Sheet Q 19

Top