format

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hello all,

I would like to name a worksheet based on "Today()" that
is in a text box. I am having trouble because you cannot
use "/" ":" etc in a sheet name. All I need is the date
and "12-22-04" would work well.

Thanks
 
Tim

Not sure if ive understood right, but to create a new sheet, and name as
todays date (with your format below), you could try;

Sub addsheet()
Dim NewSheet
Set NewSheet = Sheets.Add
NewSheet.Name = Format(Date, "mm-dd-yy")
End Sub

Dave
 

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