Disabling an 'on load' macro
Disable events before opening the book
Application.enableevents = false
and reset afterwards
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Gizmo63" wrote in message
...
Hi guys,
I have a number of individual workbooks that execute a macro automatically
on load (it modifies the protection).
I also have a big 'consolidation' workbook that collates the info from all
the individual workbooks. The Consolidation opens the individual books
according to a defined list as 'read only', copies the info it needs and
then
closes the individual book again.
The time waster here is the auto execute macro in the indivual books. Is
there an additional piece of code I can add that will stop the macro
running.
I'm using:
Workbooks.Open [loadfile], UpdateLinks:=0, ReadOnly:=True
as the open code.
Cheers Giz
|