1 Attachment(s)
Word Optionbutton Calculations
Hi,
I'm very new to this ms word vba. i'm using ms word 2010. I have 4 optionbuttons. I'm trying to get the Score = selected value * 25
i really need some examples step by step. i wont mind if someone use another number besides 25 for examples and steps. im having a very hard time doing this and i need help.
i rename my OptionButtons1 to 4 to:
optionbutton_1_3 (optionbutton1)
optionbutton_1_2 (optionbutton2)
optionbutton_1_1 (optionbutton3)
optionbutton_1_0 (optionbutton4)
i want 0 to be set as default when selecting the optionbutton 0
i want the numbers to appear on the top where it say score and it is set to 0. (SEE IMAGE BELOW)
Dim lngX As Long
Private Sub OptionButton_1_3_Click()
If OptionButton_1_3.Value = True Then
ActiveDocument.Result = 75
End If
ActiveDocument.Fields.Update
End Sub
Private Sub OptionButton_1_2_Click()
If OptionButton_1_2.Value = True Then
ActiveDocument.Result= 50
End If
ActiveDocument.Fields.Update
End Sub
Private Sub OptionButton_1_1_Click()
If OptionButton_1_1.Value = True Then
ActiveDocument.Result = 25
End If
ActiveDocument.Fields.Update
End Sub
Private Sub OptionButton_1_0_Click()
If OptionButton_1_0.Value = True Then
ActiveDocument.Result = 0
End If
ActiveDocument.Fields.Update
End Sub
Attachment 21965