Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why excel close all files when I just want to close one files | Excel Discussion (Misc queries) | |||
why do all excel worksheets/workbooks close when I close one? | Excel Discussion (Misc queries) | |||
Not close thead when I close excel | Excel Programming | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel |