ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I run a macro/program when Excel saves worksheet? (https://www.excelbanter.com/excel-programming/312636-can-i-run-macro-program-when-excel-saves-worksheet.html)

terrym

Can I run a macro/program when Excel saves worksheet?
 
I'm desperate to find out how I can run a macro or vba program when the file
is saved (or even when Excel quits). I've read that I can run a macro for
example when Excel starts using Auto_Start but I don't know of any other
prenamed macros that I can use.

My overall aim is to save the file in two formats (one Excel and the other
HTM for the Intranet site) but I want this to be invisible to all users of
the spreadsheet.

Thanks in eager anticipation,

Terry

Frank Kabel

Can I run a macro/program when Excel saves worksheet?
 
Hi
you could use the workbook_beforesave event. See:
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany


TerryM wrote:
I'm desperate to find out how I can run a macro or vba program when
the file is saved (or even when Excel quits). I've read that I can
run a macro for example when Excel starts using Auto_Start but I
don't know of any other prenamed macros that I can use.

My overall aim is to save the file in two formats (one Excel and the
other HTM for the Intranet site) but I want this to be invisible to
all users of the spreadsheet.

Thanks in eager anticipation,

Terry



All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com