After save event
Hi,
You can use an OnTime event to fire a macro after the
save, but you do need to ensure the save has actually
taken place. E.g.:
In a normal module:
Sub AfterTheSave()
If Thisworkbook.Saved=True then
Msgbox "Saved, or at least not modified since last save"
Else
Msgbox "Not saved!"
End If
End Sub
In the Thisworkbook module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel As Boolean)
Application.OnTime Now, "AfterTheSave"
End Sub
Regards,
Jan Karel Pieterse
Excel TA/MVP
-----Original Message-----
Hi,
I want to execute some code just after the user saved the
file. In excel97 I could not find something like an
AfterSave event (although a BeforeSave exsist).
Anybody any ideas?
Thanks
.
|