Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
After Save
I have used Before Save code but is there a way to do After Save code?
Thank you, Steven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
After Save
Caters for both Save and SaveAs
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim sFile Application.EnableEvents = False '<Optional - this would be before save code Cancel = True If SaveAsUI Then sFile = Application.GetOpenFilename("Excel Files (*.xls), *.xls") If sFile < False Then ThisWorkbook.SaveAs sFile '<Optional - this would be after save code End If Else ThisWorkbook.Save '<Optional - this would be after save code End If Application.EnableEvents = True End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Steven" wrote in message ... I have used Before Save code but is there a way to do After Save code? Thank you, Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming |