Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a workbook withAuto-open Macros without transferring control

I have an Excel workbook (A) in excel XP that contains VBA code to open
workbook B.

Application.AutomationSecurity = msoAutomationSecurityForceDisable
Application.EnableEvents = False
Set LHSwb = Workbooks.Open(LHS_PATH & "/" & LHS_files.Value)

Application.AutomationSecurity = msoAutomationSecurityLow


Now B has some Auto_open macros in it and what happens after the the
above lines execute is that control seems to transfer to the VBA code
in B alhtough nothing really runs

My code in A is then reset and goes back to the start of the sub
without executing any statements after

Set LHSwb = Workbooks.Open(LHS_PATH & "/" & LHS_files.Value)


Any help would be appreciated.

Thanks,

Sukhin

Reply
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
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
Disable Macros when opening workbook Rob[_21_] Excel Programming 7 November 12th 04 09:22 AM
How to control worksheet initialization upon opening a workbook Nick Excel Worksheet Functions 3 October 31st 04 04:36 PM
Open workbook-macros enabled, opening another with macros George J Excel Programming 5 September 17th 04 02:07 PM
Opening a workbook containing macros from VB Brian Walters Excel Programming 2 August 6th 03 10:20 PM


All times are GMT +1. The time now is 08:53 AM.

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

About Us

"It's about Microsoft Excel"