Save File with the current date and time.

N

Norman Jones

Hi SD,

Try:

'=============>>
Public Sub Tester04A()

ActiveWorkbook.SaveAs _
Filename:=Format(Now, "yyyymmdd hh-mm") & ".xls", _
FileFormat:=xlWorkbookNormal

End Sub
'<<=============
 
V

Vikesh Jain

Hi Norman,
Just wanted to extend the question. Is there a way whereby:

Step 1- You run a macro for a workbook once where you also specify a
new path
Step 2- After running this macro, Excel creates a backup file for the
selected workbook at the path which you have mentioned in Step 1
Step 3- Now whenever you save the file (Using normal CTRIL+S or
File->Save command), an updated Backup copy of the workbook is created
at the specified path with date and time in the file name.

I want to have the macro so that I can understand the logic and then
customise it for my requirements.

Thanks in advance.
 

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