View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Running a macro before saving file

Hi
you can use the workbook Beforesave event. enter the following in your
workbook module
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Msgbox "Will save now"
'enter your code here
End Sub

Frank

Einollah2001 wrote:
How can I run a macro automatically right before saving a file. So
all the user had to do is to click on save and the macro will run.??

Thanks
E.B.