Thread: Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Formula

Check the calculate on exit check box of Text2

Insert a form field and set its properties to 'calculated' and in the
calculation area enter

=(Text1 * Text2) / 60

OR

Insert a formula field (not a form field) at the location where you want the
result of the calculation to appear eg

{=({REF Text1} * {REF Text2}) / 60}

Use CTRL+F9 for each bracket pair {} (Note you will get an error if there is
no content in Text1 and Text2.)

OR

Run the following macro on exit from Text2 to write the result of the
calculation in form field Text4

Sub Calc1()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
oFld("Text4").Result = (oFld("Text1").Result * oFld("Text2").Result) /
60
End Sub

Uncheck the Fill in Enabled property of Text4

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Mark Lewis wrote:
Hi,

I'm trying to perform a calculation in a form

'Text1' multiply by 'Text2' Divided by 60?

Any help please?

Word help doesn't offer any assistant in calculations!

Thanks

Mark