XL Save As

  • Thread starter Thread starter Risky Dave
  • Start date Start date
R

Risky Dave

Hi,

I've got a macro that runs a whole set of stuff and I would like to add a
final tweak so that the file saves itself with a unique date stamp. This is
run off a button click within a file.

The format will be:

SaveAs \\network_path\yymmdd My charts.xls

Can anyone please tell me the syntax to make XL save as a different file
name, please?

(As you can see, I'm not a programmer - learning this stuff as I go along)

TIA

Dave
 
Try this

Sub AATest()
mypath = "J:\Mydir\" 'Change to full path name
ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd")
End Sub

Mike
 
Perfect!

My thanks

Mike H said:
Try this

Sub AATest()
mypath = "J:\Mydir\" 'Change to full path name
ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd")
End Sub

Mike
 

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