I'm creating this form for the military and need some help. I need to have different circles change colors depending on input. 12 questions asking for answers b/w 0 - 100. Oval will be red for < 70, amber for 70 - 85, green for > 85
Request for excel, visual basic code
Collapse
X
-
Tags: None
-
Since its VBA, you cannot have chapes that easily. I recomend you to use labels with capital O's, use big bold fonts and change the fore color acording to the answers.Originally posted by PFC jonathan smithI'm creating this form for the military and need some help. I need to have different circles change colors depending on input. 12 questions asking for answers b/w 0 - 100. Oval will be red for < 70, amber for 70 - 85, green for > 85
Assuming the answer is entered in a text box called txtInput, and this label is called lblCircle, your code should look like this:
[CODE=vb]if txtInput.text < 70 then
lblCircle.forec olor = rgb(255,0,0)
elseif txtinput.text < 85 then
lblCircle.forec olor = rgb(255,200,0)
else
lblCircle.forec olor = rgb(0,175,0)
end if[/CODE]
HTH
Comment