Excel

BeforeSave event is very useful for running customized code while saving the workbook.

 

Example

{code}

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel as Boolean)
    a = MsgBox "Ok I am saving the sheet now.............."

End Sub

{/code}