Nope.
Try a small experiment.
Create a new workbook with 3 sheets.
Put this behind each worksheet:
Option Explicit
Private Sub Worksheet_Calculate()
MsgBox Me.Name
End Sub
Then go back to one sheet and type this in any cell:
=rand()
and hit enter.
Excel is pretty smart when it thinks, er, knows that it has to recalculate a
sheet.
JMay wrote:
>
> E-X-P-A-N-D-I-N-G on your comment
> "If you changed a cell value that would trigger a recalc, then that happens
> all the time" -
>
> might I embellish your statement by saying:
>
> If you change a cell value ON ANY WORKSHEET - that triggers a recalc, AND
> IF you have a Worksheet_Calculate on ANY Code-Sheet in your ActiveBook, This
> Event Code Module Fires - and that happens all the time.
>
> Right?????
>
> Thanks, Jim
>
> "Bernie Deitrick" wrote:
>
> > 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" <(E-Mail Removed)> wrote in message
> > news:A8203E4D-5595-4434-BEA1-(E-Mail Removed)...
> > > 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?
> >
> >
--
Dave Peterson
|