After Save
I have used Before Save code but is there a way to do After Save code?
Thank you, Steven |
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 |
All times are GMT +1. The time now is 08:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com