Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Macro to Calculate Table Formulas

Status
Not open for further replies.

samato

Technical User
Apr 26, 2003
37
US
I have a simple table in Word and one formula calculate the total from another table and the next formula calculates the difference between the total of one from another. The problem is I can not get people to understand they have to press F9 to update the fields. Is there an easier way, can a macro be used?
 
Would it help if you added some code to the Document_Open event, so when ever the document is opened the fields get updated?

faq219-2884

Gerry
My paintings and sculpture
 
samato,

For future reference, please post VBA/Macro-specific questions in forum707

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Hi samato,

If you:
. set the document up as an MS Word form, with the table(s) in their own section(s);
. use formfields in the cells where the user updates the values to be calculated;
. set the above formfield properties to 'calculate on exit'; and
. protect the section(s) with the table(s) for forms (see Tools|Protection), that should fix the problem.

Putting the table(s) in their own section(s), along with anything else you want to prevent changes to, will allow the users to edit other parts of the document, while protecting the parts you want to control.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top