View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Pausing code execution until calculation is complete

you don't have any control on when the event fires. You do have control on
what the event does. You might look at application.Ontime to have the event
trigger off the actions you want to take with a delay.

http://www.cpearson.com/excel/ontime.htm

for information on using ontime.

that said, in my testing, calculate completes before the change event fires.
I believe that isn't true for a DDE connection - and I have worked around
that by having the event issue a calculate command. So you may have
something special going on. If so, it might be helpful to say what isn't
getting completed before your change event.

--
Regards,
Tom Ogilvy


"AVR" wrote:

I have posted several questions on worksheet change event behavior, but I
have narrowed the problem down to the recalculation that coincides with the
change event. Is there a way to delay the execution of code inside a
Worksheet_Change subroutine until after any recalculation caused by the
change is complete?