Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I hope you are looking to save a copy of the workbook to the same path with
the date/time... Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.DisplayAlerts = False Me.SaveCopyAs Me.Path & "\" & Format(Now, "yyyymmdd-hhmmss") & ".xls" Application.DisplayAlerts = True End Sub -- Jacob (MVP - Excel) "lena_form" wrote: Hello, How can I create a code in VBA, in Excel 2007, for when closing a book, save it automatically with a new name (the system date and time)? Thanks -- HC |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Suddenly Save and Save as greyed out in Excel 2003 | Excel Discussion (Misc queries) | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
'document not saved' for 'save' or 'save as' an EXCEL file | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
save button in excel to save one of the worksheets with a cell value as its name | Excel Programming |