Run a macro upon saving

  • Thread starter Thread starter Donnette
  • Start date Start date
D

Donnette

Probably a simple one - I am trying to set up a macro to run when the user
saves the file via the save icon. I have the macro set up to generate an
email with the file as an attachment, but would like the macro to run on
save. Thanks.
 
In Thisworkbook Module.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI _
As Boolean, Cancel As Boolean)
macroname or code to run
End Sub


Gord Dibben MS Excel MVP
 
Back
Top