Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Disabling Events: Dangerous?

I think I have this one sussed, but wanted to check that there are no
unexpected side-effects!

I have a workbook, which contains several macros. One of which is
triggered by the Workbook_Open event to 'initialise' the worksheets
before the user begins to change it.

During the initialisation, the Workbook_Open macro makes changes which
trigger other event macros, most of which mess up the sheet if they run
during the initialisation.

I assume that the following will stop any other macros running before
the Workbook_Open macro has stopped:

Application.EnableEvents = False
'initialize the Worksheets
Application.EnableEvents = True

But is there anything I've overlooked that might mess other things up?

Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Disabling Events: Dangerous?

It sure seems like a reasonable approach to me.

But I think the way you really find out if there's other problems is by testing
the heck out of it.



JakeyC wrote:

I think I have this one sussed, but wanted to check that there are no
unexpected side-effects!

I have a workbook, which contains several macros. One of which is
triggered by the Workbook_Open event to 'initialise' the worksheets
before the user begins to change it.

During the initialisation, the Workbook_Open macro makes changes which
trigger other event macros, most of which mess up the sheet if they run
during the initialisation.

I assume that the following will stop any other macros running before
the Workbook_Open macro has stopped:

Application.EnableEvents = False
'initialize the Worksheets
Application.EnableEvents = True

But is there anything I've overlooked that might mess other things up?

Thanks for your help.


--

Dave Peterson
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
Dangerous fillcolor change, saving 2007 to 97-2003 tampoera Excel Discussion (Misc queries) 1 March 3rd 08 12:20 PM
Disabling Events Patrick Simonds Excel Programming 3 October 5th 05 12:35 PM
Prevent user disabling events JP Farrow Excel Programming 1 September 29th 04 04:49 PM
Disabling/enabling events with a button created by code?? Simon Lloyd[_518_] Excel Programming 5 July 7th 04 12:09 PM
Disabling Events MWE[_28_] Excel Programming 4 February 6th 04 05:39 AM


All times are GMT +1. The time now is 04:04 AM.

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"