Hello to everyone.
I have two questions.
1> My First question is that i have user form on Excel VBA.There are seven labels and each Label has some value as following.
Label8 value =80
Label9 value =85
Label10 value =70
Label11 value =80
Label12 value =80
Label13 value =90
Label14 value =100
Label15 = I want the sum of all the values in this Label.
2> My 2nd question is that i have qot these values on labels depending on optionbuttons.The value of each label depend on five options buttons , values starts from 20 to 100.i mean when the user check the first option in the first question , Label8 shows 20,when a user check the 2nd option button , label8 shows 40 and so on.
I have set all this sitting but now i want that when a user check an option , the value color in the label becomes change as below
if the value in the label is <=80 the value color becomes Red and if the value > 80 the value color in the Label becomes blue.I have write the following code but it is not working
dim scoreOPTA1 as integer
scoreOPTA1=optA1.Value ' optA1 is option1 button name
If optA1.Value <=80 Then
optA1.forcolor= RGB(255,0,0)
scoreOPTA1 =RGB(255,0,0)
Label8=scoreOPTA1
else if optA1.Value >80
Then
optA1.forcolor= RGB(0,0,255)
scoreOPTA1 =RGB(255,0,0)
Label8=scoreOPTA1
end if
Display More
This code gives only red color for every value . Please guide me about my these two question
Thanks