Automatic Save As Macro

W

wrvadmin

I need help in creating a macro that will prompt the user who opens the
workbook to automatically save the workbook with a new file name. I have a
workbook that is revised on a daily basis and I want to maintain the previous
day's file. I am generally the one who opens the workbook, but there will be
days when someone else opens it on their computer. It doesn't have to be a
mandatory save, but I want the prompt there as a reminder to save with a new
filename.
 
D

Dave Peterson

Option Explicit
Sub Auto_Open()
Msgbox "Remember to save as a new name. Well, if you want!"
End Sub

or

Option Explicit
Sub Auto_Open()
Application.Dialogs(xlDialogSaveAs).Show
End Sub

To just show the File|SaveAs Dialog
 
F

FSt1

hi
would this work for you?
Private Sub Workbook_Open()
If MsgBox("Do you want to save the file under a different name?") = vbYes
Then
Application.Dialogs(xlDialogSaveAs).Show
Else
Exit Sub
End If
End Sub

regards
FSt1
 
W

wrvadmin

Thank you. The second macro did the trick.

Dave Peterson said:
Option Explicit
Sub Auto_Open()
Msgbox "Remember to save as a new name. Well, if you want!"
End Sub

or

Option Explicit
Sub Auto_Open()
Application.Dialogs(xlDialogSaveAs).Show
End Sub

To just show the File|SaveAs Dialog
 

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

Top