Automatic saving

  • Thread starter Thread starter Berend Botje
  • Start date Start date
B

Berend Botje

Hi,

I am trying to make a "save as" application that does not require th
user to confirm the save. This means the script generates th
directory- and filename and automatically saves the workbook there.

Is this possible?

Yours truly,

Berend Botj
 
Berend

Possible, yes.

Sounds easy when you say it quickly, but you have a few variables in
there.......

When would you like to trigger the "save as"?

From what variables would the folder and filename be generated?

Here is some code that can be used to save the file and a backup copy using
the original name when you close the file.

Maybe adapt to suit or post back with more info.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:="E:\GordStuff\Backup\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub

Gord Dibben Excel MVP
 

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