Update Fields Problem

O

Owen

Hi

I am using the macro below to update formula fields within the last row of a
table.
The other rows in the table contain text form fields with numerical input.

When the macro is run, the text form fields are cleared and given a value of
zero.
Is it possible to maintain the users input in the text form fields and only
have the formula fields updated?

Thanks for your help.

ActiveDocument.Unprotect Password:="ngo999"
Selection.WholeStory
Selection.Fields.Update
ActiveDocument.Protect (wdAllowOnlyFormFields), Password:="ngo999"
 
G

Graham Mayor

You don't need to unprotect the form to update the fields, nor do you need a
macro to update calculated fields. Simply check the 'calculate on exit'
check box property of at least the last field that contributes to the
calculation.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
O

Owen

Thanks Graham

Keeping the protection on has sorted the problem.

Thanks for your help.
 

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