Dates in Tabs

  • Thread starter Thread starter Voodoodan
  • Start date Start date
V

Voodoodan

Hi!

I have recorded a macro to copy an existing worksheet and add it int
the workbook.

However the new sheet will show, for example, "Test (2)". I'd like th
new tab to show today's date instead.

Does anyone know if this can be done and, if so........... how?!?

Many thanks,
Dan
 
post your code (macro) so that we can see where you are at this point.
 
Ok, here it is. Unfortunately, it's just a recorded macro, not reall
rocket science this one!!

Sub CopyTab()
Sheets("Test").Select
Sheets("Test").Copy After:=Sheets(3)
End Sub

That's it!

Thanks,
Dan
 
add this line before End Sub:
ActiveSheet.Name = Format(Date, "yyyy-mm-dd") 'Returns 2004-06-02
HTH
 

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