ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problems with Auto_Close when opening spreadsheet from a macro (https://www.excelbanter.com/excel-programming/344757-problems-auto_close-when-opening-spreadsheet-macro.html)

L2B[_2_]

Problems with Auto_Close when opening spreadsheet from a macro
 

I have an auto_close macro in a spreadsheet. When I open the spreadsheet
directly it executes perfectly on closing it. However, when the
spreadsheet is opened from another macro this code does not execute.

Is there an option I can set to ensure it runs, or do automacros never
execute from another workbook?

Many thanks.

L


--
L2B
------------------------------------------------------------------------
L2B's Profile: http://www.excelforum.com/member.php...o&userid=23140
View this thread: http://www.excelforum.com/showthread...hreadid=482235


Nick Hodge

Problems with Auto_Close when opening spreadsheet from a macro
 
L

How about using the RunAutoMacros method to run it

Application.RunAutoMacros xlAutoClose
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"L2B" wrote in message
...

I have an auto_close macro in a spreadsheet. When I open the spreadsheet
directly it executes perfectly on closing it. However, when the
spreadsheet is opened from another macro this code does not execute.

Is there an option I can set to ensure it runs, or do automacros never
execute from another workbook?

Many thanks.

L


--
L2B
------------------------------------------------------------------------
L2B's Profile:
http://www.excelforum.com/member.php...o&userid=23140
View this thread: http://www.excelforum.com/showthread...hreadid=482235





All times are GMT +1. The time now is 04:28 AM.

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