How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Greg Maxey Your Own Question

Greg Maxey
Greg Maxey, Consultant\Microsoft Word Expert
Category: General
Satisfied Customers: 62
Experience:  Microsoft Word Most Valuable Professional (6 years)
16468162
Type Your Question Here...
Greg Maxey is online now
A new question is answered every 9 seconds

How do I calculate the total of the values selected from my

This answer was rated:

How do I calculate the total of the values selected from my drop boxes (I have 6) in a MS Word form?
Assuming your DropDowns are named (bookmarked) "DropDown1 through DropDown 6" and you have a text formfield "Text1" to hold the result, you could run a macro OnExit from each dropdown:

Sub CalcDDs()
Dim oFFs As FormFields
Set oFFs = ActiveDocument.FormFields
oFFs("Text1").Result = Val(oFFs("DropDown1").Result) _
+ Val(oFFs("DropDown2").Result) _
+ Val(oFFs("DropDown3").Result) _
+ Val(oFFs("DropDown4").Result) _
+ Val(oFFs("DropDown5").Result) _
+ Val(oFFs("DropDown6").Result)
End Sub
Customer: replied 7 years ago.
Will this work if my results aren't in a text formfield? I have 6 drop-down form fields where users select 1 - 5. Then I wanted to add up the total of the numbers they select. Should I change the field from a drop-drop to a text field?
No. The six dropdown fields is where your users select from 1 to 5. You have to have someplace to put the result i.e., assuming they pick 5 from each dropdown the result is going to be 30. Where do you want this result to appear. The procedure I provided assumes that it is placed in a text field bookmarked Text1. If you want that result someplace else then you will have to revise the code.
Greg Maxey and 47 other General Specialists are ready to help you