|
-
September 4th, 2001, 03:57 PM
#1
Disabling Excel Macros
I am trying to open an Excel workbook from a VB application, as follows:
'---------------------------
Dim wkbk As excel.Workbook
'-- NOTE: App is an instance of the Excel Application object
Set wkbk = App.Workbooks.Open(sWorkbook, False, False)
'---------------------------
This works fine until I come across a workbook that has code in the Workbook_Open() method. When the code in this method is run it may cause a run-time error in Excel that I cannot trap in VB, which causes my application to break.
Does anyone know how to prevent the code in the Workbook_Open() method from running when the workbook is opened?
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|