How to use macro to rename worksheet with date +"text"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What context must I use to rename a worksheet tab with the the current date

I have success with naming it in a macro with text using
ActiveSheet.Selec
ActiveSheet.Name = "HD

I would like tab to be named "Date-HD" but the TODAY() function doesn't work.....

Thanks for your input
 
Activesheet.Name = Format(Date, "yyyy mm dd") & "-HD"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
hi Frank

I tweaked to

ActiveSheet.Name = Format(Date, "mm-dd-yy") & "-HD

and it does what I wanted

Thanks for the help

Sherri
 
Always advisable for using dates in the format yyyy mm for sorting purposes.
 

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

Back
Top