Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Phil,
The Auto_Open macro is not executed when a file is opened via VBA. You can call the RunAutoMacros method to execute the Auto_Open procedures. Workbooks("Housing BSC for 2004.xls").RunAutoMacros xlAutoOpen -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Phil Hageman" wrote in message ... I have the following macro code in the Personal.xls workbook to open a workbook: Sub OpenBSC() Workbooks.Open ("W:\Housing\Housing BSC for 2004.xls") End Sub However, the sub ignores an AutoOpen() sub in the target workbook's Module1. How do I make the macro run the Module1 AutoOpen() in the target workbook? Thanks, Phil |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip, the RunAuto... did the trick. Thanks
-----Original Message----- Phil, The Auto_Open macro is not executed when a file is opened via VBA. You can call the RunAutoMacros method to execute the Auto_Open procedures. Workbooks("Housing BSC for 2004.xls").RunAutoMacros xlAutoOpen -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Phil Hageman" wrote in message ... I have the following macro code in the Personal.xls workbook to open a workbook: Sub OpenBSC() Workbooks.Open ("W:\Housing\Housing BSC for 2004.xls") End Sub However, the sub ignores an AutoOpen() sub in the target workbook's Module1. How do I make the macro run the Module1 AutoOpen() in the target workbook? Thanks, Phil . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove Protected Macro Code from Excel Module | Excel Discussion (Misc queries) | |||
code to delete module / macro in another file | Excel Discussion (Misc queries) | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
Macro ignors module code | Excel Programming | |||
Macro ignors module code | Excel Programming |