C
CLR
Hi All.........
I am trying to disable all change-event macros (or even ALL macros) upon
opening a second workbook, with my code in the first workbook so the first
workbooks macros will function without any interference from the second
workbook macros.
I've tried
Application.EnableEvents = False
workbook.open
and tried
Sec = Application.AutomationSecurity
Application.EnableEvents = False
Application.AutomationSecurity = msoAutomationSecurityForceDisable
workbook.open
both seem to work, but when I then use a line like
Activesheet.UsedRange.SpecialCells(xlCellTypeFormulas, 23).Count
It starts to run the "Private Sub Worksheet_SelectionChange(ByVal Target As
Excel.Range)" macro for the Sheet in the second workbook that is active.
I would like it to NOT do that.
Any assistance would be much appreciated.
Vaya con Dios,
Chuck, CABGx3
I am trying to disable all change-event macros (or even ALL macros) upon
opening a second workbook, with my code in the first workbook so the first
workbooks macros will function without any interference from the second
workbook macros.
I've tried
Application.EnableEvents = False
workbook.open
and tried
Sec = Application.AutomationSecurity
Application.EnableEvents = False
Application.AutomationSecurity = msoAutomationSecurityForceDisable
workbook.open
both seem to work, but when I then use a line like
Activesheet.UsedRange.SpecialCells(xlCellTypeFormulas, 23).Count
It starts to run the "Private Sub Worksheet_SelectionChange(ByVal Target As
Excel.Range)" macro for the Sheet in the second workbook that is active.
I would like it to NOT do that.
Any assistance would be much appreciated.
Vaya con Dios,
Chuck, CABGx3