Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Do loop for specified time to perform calculations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doc60 - 01 Nov 2007 12:10 GMT
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.
macropod - 02 Nov 2007 09:52 GMT
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
Signature

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

>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
[quoted text clipped - 3 lines]
>
> Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.