Code jumps to WS_Calculate on a different sheet
If you changed a cell value that would trigger a recalc, then that happens
all the time.
It is best to preceed your code with this is you make and changes to cell in
code:
Dim myCalc As Excel.XlCalculation
With Application
.EnableEvents = False
myCalc = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
'and finish with
With Application
.EnableEvents = True
.Calculation = myCalc 'xlCalculationAutomatic is the usual setting
.ScreenUpdating = True
End With
HTH,
Bernie
MS Excel MVP
"JMay" wrote in message
...
I'm stepping through a Standard module on my Sheet2, but suddenly my code
jumps to a Private Sub Worksheet_Calculate which is a part of my
Worksheet7.
Why is that?
|