View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
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