Can a test to determine whether a workbook needs to be calculated
Hi Breck,
I am not quite sure what you mean by "needs to be calculated", if you mean
that you have changed something on the sheet (because this is normaly the
time a sheet recalculates when in Automatic mode) then put whatever macro you
need to run in the Change event of the sheet *, or if you want the macro to
run on any sheet in the workbook then put the macro in Workbook code module
in the Sheet_Change event.**
Hope this helps.
* Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Something has changed"
End Sub
**Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
MsgBox "Something has changed"
End Sub
--
A. Ch. Eirinberg
"Breck" wrote:
I have a workbook that has manual calculation turned on. I need to run
a macro that only runs if the workbook needs to be calculated on the
active sheet.
I have found this code Application.CalculationVersion <
activeworkbook.CalculationVersion that appears to perform this test
but it always returns a false value whether the calculation indicator
show calculate or not.
|