I am writing a Word Macro that I want to have calculate the value a column of
cellsl only when the value in another cell is > 0. I already have the
calculation setup but need have the macro look at a specific cell to see if
the value in the cell is > 0 and if it is, it should do the calculation in
another in the column of cells. If it is not > 0 then the macro should stop.

Thanks in advance.

Re: Do loop for specified time to perform calculations by macropod

macropod
Fri Nov 02 01:52:56 PDT 2007

Hi Doc60,

If you use a formula field for the calculation, then something as simple as doing a print preview will be enough to get it to
recalculate. Alternatively you could use a macrobutton field to drive a simple macro, coded like:
Sub ReCalc()
On Error Resume Next
ActiveDocument.Tables(1).Range.Fields.Update
End Sub

For some pointers on the use of formula fields, check out my Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=365442
or
http://www.gmayor.com/downloads.htm#Third_party


Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Doc60" <Doc60@discussions.microsoft.com> wrote in message news:2C0FA1D1-5062-47C5-A081-A0B6ACF1BC0E@microsoft.com...
>I am writing a Word Macro that I want to have calculate the value a column of
> cellsl only when the value in another cell is > 0. I already have the
> calculation setup but need have the macro look at a specific cell to see if
> the value in the cell is > 0 and if it is, it should do the calculation in
> another in the column of cells. If it is not > 0 then the macro should stop.
>
> Thanks in advance.
>