I have a slider bar (Scrollbar1) that chooses a value between 1 and 4.
That value then populates my userform at bookmark "Row1Total" via this
VBA:
Private Sub Scrollbar1_Change()
ActiveDocument.FormFields("Row1Total").Result = ScrollBar1.Value
End Sub
There are three slider bars altogether, and as each one is assigned a
value, I would like the "total' at the bottom to update automatically.
My calculation field (ManSub1) is: =Row1Total+Row2Total+Row3Total
Each of the three form fields update just fine as the slider bar is
moved; and, they are set to calculate on Exit; however, the total in
ManSub1 does not update.
Help?
Cheers,
TMan
TomorrowsMan was telling us:
TomorrowsMan nous racontait que :
> I have a slider bar (Scrollbar1) that chooses a value between 1 and 4.
> That value then populates my userform at bookmark "Row1Total" via this
[quoted text clipped - 5 lines]
>
> End Sub
According to this code, your are not populating a field on a userform, but
in the document itself.
> There are three slider bars altogether, and as each one is assigned a
> value, I would like the "total' at the bottom to update automatically.
[quoted text clipped - 4 lines]
> moved; and, they are set to calculate on Exit; however, the total in
> ManSub1 does not update.
For "On Exit" to work you have to actually enter the field and then exit it
from within the document, not with code.
You need to use the ".Fields.Update" method.
See the examples in the on line VBA help.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org