View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Initiate Macro On Save

There is a Before Save Event associted with ThisWorkbook. Right Click the
Excel Icon next to File on the menu bar and select View Code. Then paste the
following...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
msgbox "you are saving..."
End Sub
--
HTH...

Jim Thomlinson


"JTWood" wrote:


I need to initiate a macro when someone tries to "save" or "save as..."
a file. Is that possible?


--
JTWood
------------------------------------------------------------------------
JTWood's Profile: http://www.excelforum.com/member.php...o&userid=34192
View this thread: http://www.excelforum.com/showthread...hreadid=551610