Opening a workbook withAuto-open Macros without transferring control

S

sukhin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top