ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Intercepting Save and Exit menu command in Excel (https://www.excelbanter.com/excel-programming/336341-intercepting-save-exit-menu-command-excel.html)

PeteMann

Intercepting Save and Exit menu command in Excel
 
Hi,

I have a programming need to be able to intercept the menus "File/Open",
"File/Exit", "File/Save" and "File/SaveAs" within Excel. I've managed to do
this in Word by overwriting the "FileOpen" "FileExit" "FileSave" and
"FileSaveAs" macros, which then drive a c# com object to stream the data to
(or from) a seperate server. Is this possible within Excel, and if so, what
are the Macro names to overwrite?

Thanks for any help or pointers,

Pete

STEVE BELL

Intercepting Save and Exit menu command in Excel
 
Pete,

In the ThisWorkBook module you can create event macros
Workbook_Activate
Workbook_BeforeClose
Workbook_BeforeSave
Workbook_Deactivate
Workbook_Open

Play with these and put in your conditions and what you want...

--
steveB

Remove "AYN" from email to respond
"PeteMann" wrote in message
...
Hi,

I have a programming need to be able to intercept the menus "File/Open",
"File/Exit", "File/Save" and "File/SaveAs" within Excel. I've managed to
do
this in Word by overwriting the "FileOpen" "FileExit" "FileSave" and
"FileSaveAs" macros, which then drive a c# com object to stream the data
to
(or from) a seperate server. Is this possible within Excel, and if so,
what
are the Macro names to overwrite?

Thanks for any help or pointers,

Pete





All times are GMT +1. The time now is 01:27 PM.

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