VB code to email at File Save is nnot auto-running

Closed
geelsu Posts 2 Registration date Wednesday April 9, 2014 Status Member Last seen April 9, 2014 - Apr 9, 2014 at 10:12 AM
geelsu Posts 2 Registration date Wednesday April 9, 2014 Status Member Last seen April 9, 2014 - Apr 9, 2014 at 11:36 AM
Hello, all,

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?

UPDATE:

Ummm. I thought I was updating an old thread. This thread is related to the code located at:
https://ccm.net/faq/27784-excel-be-notified-by-mail-when-shared-workbook-is-updated

Related:

1 response

geelsu Posts 2 Registration date Wednesday April 9, 2014 Status Member Last seen April 9, 2014
Apr 9, 2014 at 11:36 AM
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.
0