LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Protected Macro Code from Excel Module TGV[_2_] Excel Discussion (Misc queries) 4 August 24th 09 04:10 PM
code to delete module / macro in another file Ray Clark[_2_] Excel Discussion (Misc queries) 1 July 3rd 08 04:15 AM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Macro ignors module code Bill Lunney Excel Programming 1 August 9th 03 09:05 PM
Macro ignors module code Bob Phillips[_5_] Excel Programming 0 August 9th 03 07:12 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"