Crazy optionbuttons
I have a very weird problem with a userform and its option buttons. As you can see from the first picture, there are 5 identical columns of buttons, each with 14 rows. Each row is grouped with a frame. When the Calculate Scores button is hit, a grade is created below each column. It appears to be working as expected until any button in row 11 is selected. At that point, the grade does not get calculated and, this is where it gets weird, if you look at the picture you will see that some of the option buttons in row one have either changed (yes, flat out changed to a different selection) or become "half" selected. Has anyone every seen this or have any suggestions how to fix this problem? THANKS!!
I have attached a dummy sheet.
In testing the form, try selecting the 5 button for the first 11 rows. When you hit calculate score, you should see a grade populate. Then select any button on the 12th row, hit calculate, and things will start to get crazy. If you click the 5 button, you will see a ghost selection in row one appear. If you select button 1 in that row, you will see row one actually change selections. Keep playing with selections and more changes in row one will occur.
Attachment | Size |
---|---|
Form for testing.xlsm | 40.76 KB |
Found your problem
Hello,
I was stumped when I first looked at this, it was driving me crazy. So I went through your code with a fine tooth comb and I believe I figured out the issue! Here are two samples from your code, I have crossed out the issues:
'Speaker 1 item 1
If
s1i11.Value = True Then s1i1 = 1If s1i12.Value = True Then s1i1 = 2
If s1i13.Value = True Then s1i1 = 3
If s1i14.Value = True Then s1i1 = 4
If s1i15.Value = True Then s1i1 = 5
'
'
'
'Speaker 1 item 11
If s1i111.Value = True Then
s1i11= 1If s1i112.Value = True Then
s1i11= 2If s1i113.Value = True Then
s1i11= 3If s1i114.Value = True Then
s1i11= 4If s1i115.Value = True Then
s1i11= 5Notice you have repeated a variable 2 times. You have done this for s1i12, s1i13 and s1i14 as well. (Make sure you update your initialization and clear subs as well!)
Thank you
Thank you very much! I looked at, and past, that 100 times and just could not see it. Thanks for your help!!