How do I add a value to a check box?

L

ll23668

Hello,

I have two questions:

I am in the process of creating a performance evaluation form for my
employer.
Each section of the evaluation will have 5 scores (5 = Excellent, 4 = above
average, 3 = averaga, 2 = below average, 1 = poor). What I want to do is be
able to check the checkbox and have it populate the value of that checkbox in
a textbox representing that particular section. How would I go about doing
that?

Also, I would also like to take the value from each sections and calculate
the total scores (5,4,3,2,1) and divide it by the total possible score. How
would I accomplish this goal?
 
G

Greg Maxey

You could run a macro on exit from each checkbox something like this:

Sub EvaluateCB()
Dim oFFs As FormFields
Set oFFs = ActiveDocument.FormFields
'First question
Select Case True
Case oFFs("Check1").CheckBox.Value
oFFs("Text1").Result = "5"
Case oFFs("Check2").CheckBox.Value
oFFs("Text1").Result = "4"
Case oFFs("Check3").CheckBox.Value
oFFs("Text1").Result = "3"
Case oFFs("Check4").CheckBox.Value
oFFs("Text1").Result = "2"
Case oFFs("Check5").CheckBox.Value
oFFs("Text1").Result = "1"
End Select
'Second question
Select Case True
Case oFFs("Check6").CheckBox.Value
oFFs("Text2").Result = "5"
Case oFFs("Check7").CheckBox.Value
oFFs("Text2").Result = "4"
Case oFFs("Check8").CheckBox.Value
oFFs("Text2").Result = "3"
Case oFFs("Check9").CheckBox.Value
oFFs("Text2").Result = "2"
Case oFFs("Check10").CheckBox.Value
oFFs("Text2").Result = "1"
End Select

oFFs("Text3").Result = (Val(oFFs("Text1").Result) +
Val(oFFs("Text2").Result)) / 2
End Sub
 

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