Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default disable events does not work

Hi,

I have several public functions in the workbook I am working with, that
are activated or executed whenever I make changes in the worksheets
trough VBA. Although that is not a problem, it is not a good thing as
it is slowing the execution of the VBA code.

My guess is that the changes of the VBA codes into the worksheets,
clear cells, etc, trigger worksheets changes events.

At the beginning of the VBA code I already used:
application.EnableEvents=False to avoid those unnecessary calls to the
public functions but it does not work.

what am I missing ?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default disable events does not work

Maybe it's not the events firing that is slowing down your macro.

Maybe it's the recalculating after each change.

Turn calculation to manual
do your stuff
turn calculation back to what it was before.

Mika wrote:

Hi,

I have several public functions in the workbook I am working with, that
are activated or executed whenever I make changes in the worksheets
trough VBA. Although that is not a problem, it is not a good thing as
it is slowing the execution of the VBA code.

My guess is that the changes of the VBA codes into the worksheets,
clear cells, etc, trigger worksheets changes events.

At the beginning of the VBA code I already used:
application.EnableEvents=False to avoid those unnecessary calls to the
public functions but it does not work.

what am I missing ?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default disable events does not work

Duh !!, of course thank you, that was the problem !!!. I wonder why the
enable events doesn´t work thoug.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default disable events does not work

I bet disabling events did help (if you had events that would have fired). But
not as much as the calculation stuff (in this case).

Mika wrote:

Duh !!, of course thank you, that was the problem !!!. I wonder why the
enable events doesn´t work thoug.


--

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
Events won't Disable! roadkill Excel Discussion (Misc queries) 2 April 26th 06 04:36 PM
Disable Form Events From Being Triggered JGeniti Excel Programming 4 October 14th 05 07:48 PM
disable events while macro is running ben Excel Programming 5 January 24th 05 05:19 PM
Disable Events wiwi Excel Programming 3 December 29th 03 04:53 PM
Disable Key Events Seth[_3_] Excel Programming 1 October 6th 03 10:28 PM


All times are GMT +1. The time now is 06:15 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"