Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whenever the worksheet recalculates, I call a function that I have created.
However, the function apprars to run twice even though I am calling it once. It the worksheet calcuating more than once? How can I fix this? Thanks in advance for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is your code a UDF, or called from the worksheet calculate event ?
What does your function do ? Tim "Chad" wrote in message ... Whenever the worksheet recalculates, I call a function that I have created. However, the function apprars to run twice even though I am calling it once. It the worksheet calcuating more than once? How can I fix this? Thanks in advance for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Calling the function is probably triggering a new recalc event and causing
the macro to rerun. In your event code put the following at the beginning Application.EnableEvents=False This prevents events from triggering. and then at the end turn back on the triggering. Application.EnableEvents=True If you crash or are debugging your event triggering may be left turned off run a simple one liner to restore. (For some reason when I am testing event triggered code I always forget this) sub fixme() Application.EnableEvents=true End Sub -- If this helps, please remember to click yes. "Chad" wrote: Whenever the worksheet recalculates, I call a function that I have created. However, the function apprars to run twice even though I am calling it once. It the worksheet calcuating more than once? How can I fix this? Thanks in advance for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method "Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
triggering Workbook_SheetCalculate | Excel Programming | |||
Workbook_SheetCalculate twice | Excel Programming | |||
Workbook_SheetCalculate Events | Excel Programming | |||
Workbook_SheetCalculate looping | Excel Programming |