Thread
:
Macro ignors module code
View Single Post
#
1
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
Macro ignors module code
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 With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson