Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gizmo63
 
Posts: n/a
Default Disabling an 'on load' macro

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gizmo63
 
Posts: n/a
Default Disabling an 'on load' macro

Excellent - Thanks Bob.

"Bob Phillips" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Can I load a general macro without loading an excel document? Neil.Wills Excel Discussion (Misc queries) 1 September 1st 05 12:45 AM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"