brothertruffle880
asked on
Excel 2013 VBA - Macro to save a workbook as today's date and time
How can I write a sub so that it saves the current workbook as today's date and current time.
just like this:
2017-12-13 -- 2100.xlsm means that the file was saved on December 13, 2017 9:00 pm
This sub is not working.
What is wrong with it?
Can someone create the above code?
Sub FilenameDateTime()
ActiveWorkbook.SaveAs Format(Now(), "yyyy-m-d h\.mm.xlsm"), FileFormat:=52
End Sub
just like this:
2017-12-13 -- 2100.xlsm means that the file was saved on December 13, 2017 9:00 pm
This sub is not working.
What is wrong with it?
Can someone create the above code?
Sub FilenameDateTime()
ActiveWorkbook.SaveAs Format(Now(), "yyyy-m-d h\.mm.xlsm"), FileFormat:=52
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome!
ASKER