Macro for Table Formulas

S

Suz H

Please help. I am working on a table. Beginning on the 22nd row of the
table, there are 7 rows of 16 cells with a formula sum(left) in the 17th
cell. and at the end of the 29th row, there is the formula for sum(above).
I am trying to write a macro that will update these cells automatically. If
I do it with the update button or the "File, Formulas, OK", it works fine. I
just can't make it happen automatically. I have created a button that the
user should be able to use to update all the cells but no matter what I
write, it won't update the cells. Is there a way to update without clicking
anything. It is probably something simple but I just can't get it.

I hope some one can help. I would really appreciate it.
 
D

Doug Robbins - Word MVP

The command

ActiveDocument.Range.Fields.Update

will update all of the fields in the body of the document.

If you just wanted to update those in the table itself, use:

ActiveDocument.Tables(1).Range.Fields.Update

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
S

Suz H

Thank you so so much for your quick reply. I am on my way out the door with
my computer so I will try this soon. I don't have a lot of experience with
numbers in word (except to sum left, right and above) and I knew it was going
to be a simple one line thing but couldn't get it. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top