![]() |
Excel After Close?
I want to execute a macro after workbook closes? There is an event
"ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
Bit tricky, the workbook that the code will be in would then be closed.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
Bob, Can application.ontime be triggered to run a macro in another
workbook like personal.xls or does it die when the original workbook is closed? Die_Another_Day Bob Phillips wrote: Bit tricky, the workbook that the code will be in would then be closed. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
You can use OnTime to call a procedure in another workbook:
Application.OnTime Now + TimeSerial(0, 0, 10), _ "H:\Book16.xls!AAA" Since OnTime is an application property, it will open the workbook if needed to execute the macro. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Die_Another_Day" wrote in message oups.com... Bob, Can application.ontime be triggered to run a macro in another workbook like personal.xls or does it die when the original workbook is closed? Die_Another_Day Bob Phillips wrote: Bit tricky, the workbook that the code will be in would then be closed. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
It is application level. It doesn't die.
-- Regards, Tom Ogilvy "Die_Another_Day" wrote: Bob, Can application.ontime be triggered to run a macro in another workbook like personal.xls or does it die when the original workbook is closed? Die_Another_Day Bob Phillips wrote: Bit tricky, the workbook that the code will be in would then be closed. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
Dev, can you use this? or do you need other ideas?
Die_Another_Day Chip Pearson wrote: You can use OnTime to call a procedure in another workbook: Application.OnTime Now + TimeSerial(0, 0, 10), _ "H:\Book16.xls!AAA" Since OnTime is an application property, it will open the workbook if needed to execute the macro. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Die_Another_Day" wrote in message oups.com... Bob, Can application.ontime be triggered to run a macro in another workbook like personal.xls or does it die when the original workbook is closed? Die_Another_Day Bob Phillips wrote: Bit tricky, the workbook that the code will be in would then be closed. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
Excel After Close?
it would probably help to know what the OP wants to do after the close, as
it may be okay to not close the workbook, do his stuff, and then close it. It could always be hidden. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Die_Another_Day" wrote in message oups.com... Bob, Can application.ontime be triggered to run a macro in another workbook like personal.xls or does it die when the original workbook is closed? Die_Another_Day Bob Phillips wrote: Bit tricky, the workbook that the code will be in would then be closed. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dev" wrote in message ... I want to execute a macro after workbook closes? There is an event "ThisWorkbook_WorkbookBeforeClose" but not Workbook After close.. Does anyone how to execute a macro ****after**** workbook close? Any idea is really appreciated!! Thanks!! |
All times are GMT +1. The time now is 01:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com