Hi Hamster,

If you go to the Workbook window of the VBA, where your Workbook Open macros 
live, set the left drop-down to Workbook, then in the right drop-down, select:  
 BeforeSave.

You will se a blank sub like this:

 

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

 

End Sub

 

Then just put your code in.

Hope this helps.

Regards - Dave.


_________________________________________________________________
The new Windows Live Messenger has landed. Download it here.
http://download.live.com/
--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to