I hate to rehash this old message, but since Microsoft never stops messing with things, I suppose threads like this will never die. Maybe my version of Excel has those "extras" :) I am using Office Pro Plus 2010.
I put the code above in a module (Alt-F11), Module 1 and saved my Workbook as a .xlsm file so macros would be enabled. When run File -> Save nothing happens. How do I get this code to auto-run at File -> Save? What other things do I need to check? If I try and run it (F5) in the VB Editor it wants me to give it a Macro Name. I thought this code was suppose to run automatically at File -> Save. Any ideas?
OK. Found it. You need the sub to be in the Workbook module.
<Alt +F11> to open the VBE. Double click 'ThisWorkbook' in the Project explorer window (top left window). You will then see General at the top left of the Code window and Declarations at the top right of the Code window.
Clicking on General drops down 'Workbook' and creates the default Open sub. Select Beforesave from the declarations.