Automatic Saving

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

Hi All,

Sub Saver ()
ChDir "C:\Documents and Settings\Owner\My Documents\Binder"
ThisWorkbook.SaveAs Filename:="AC2.xls"
End Sub

This is part of a macro I use to edit and save several workbooks that are
sent to me daily. What I want it to do is for it offer me the option to
specify the file name that I save it as.

As it is, it saves as the current filename, albeit that it warns me that I
am going to overwrite an existing file. This is of no use to me as part of
the filename is the current date.

In short, I want to replicate the 'Save As' command where I can specify what
I save and where I save it to,

Hope I'm making some sort of sense,

Any help very much appreciated,

Regards,

Alan.
 
Hi Alan

You can use
Application.GetSaveAsFilename

Look in the VBA help for more information
 
Try something like

Sub Saver ()
ChDir "C:\Documents and Settings\Owner\My Documents\Binder"
ThisWorkbook.SaveAs Filename:="AC2" & Format(Date,"yyyy mm dd") & ".xls"
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks to you both,
Alan.

Bob Phillips said:
Try something like

Sub Saver ()
ChDir "C:\Documents and Settings\Owner\My Documents\Binder"
ThisWorkbook.SaveAs Filename:="AC2" & Format(Date,"yyyy mm dd") & ".xls"
End Sub


--

HTH

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

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


Back
Top