ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open Method disabling Macros (https://www.excelbanter.com/excel-programming/271790-open-method-disabling-macros.html)

Bryan Steffen

Open Method disabling Macros
 
Here's my setup. I have one spreadsheet (the "Comprehensive" workbook) that
opens a spreadsheet (1 of 6 "Regional" workbooks), imports in a variety of
data and then closes it out and repeats the routine for all 6 Regional
workbooks.

Workbooks.Open myFileName


In addition, each of the Regional workbooks contains a routine that runs
just _BeforeClose. Currently, when the Comprehensive workbook finishes
importing in the data, it closes the specific Regional workbook. That then
triggers the Workbook_BeforeClose routine, which develops a runtime error
under this nested situation.

What I would like to do is disable the macros when the Comprehensive's
import routine opens the Regional workbook. As I searched for Open Method
for Workbooks, I found no mention of being able to disable macros.

I am operating Excel 2002. All the files are on a local machine. The Excel
Security Level on the machine is set to medium. Anyone have suggestions?
Thanks

Bryan

Bryan D. Steffen





All times are GMT +1. The time now is 02:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com