CsJHUN
Active Member
- Joined
- Jan 13, 2015
- Messages
- 360
- Office Version
- 365
- 2021
- 2019
- Platform
- Windows
- Mobile
Hello guys,
in advance im just learing the passing values between subs (no clue about classes too ), also a lazy a.. for declare items.
I have a userform with (for example) a simple 2x2 + headline (3x3) crosstable. I have option buttons in the data field. I want to color the x(A or B) and y(1 or 2) headline of the clicked radio button.
<tbody>
</tbody>
So if clicked on A1 then headline A and headline 1 would be red.
Of course the original "table" is bigger than the example (currently 9x7)
The headlines are labels, the "data" is option button (radio button)
I have this:
And this gives me type mismatch error.
Help me understand this, thanks
John
in advance im just learing the passing values between subs (no clue about classes too ), also a lazy a.. for declare items.
I have a userform with (for example) a simple 2x2 + headline (3x3) crosstable. I have option buttons in the data field. I want to color the x(A or B) and y(1 or 2) headline of the clicked radio button.
tbl | Headline A | Headline B |
Headline 1 | o A1 | o B1 |
Headline 2 | o A2 | o B2 |
<tbody>
</tbody>
So if clicked on A1 then headline A and headline 1 would be red.
Of course the original "table" is bigger than the example (currently 9x7)
The headlines are labels, the "data" is option button (radio button)
I have this:
Code:
Private Sub opbtnclick(ByRef opbtn As OptionButton, ByRef lblx As Label, ByRef lbly As Label)
lblx.BackColor = vbRed
lbly.BackColor = vbRed
End Sub
Private Sub opbtn_1_1_Click()
opbtnclick Me.opbtn_1_1, Me.lbl_1_0, Me.lbl_0_1
End Sub
Private Sub opbtn_1_2_Click()
opbtnclick Me.opbtn_1_2, Me.lbl_0_2, Me.lbl_1_0
End Sub
And this gives me type mismatch error.
Help me understand this, thanks
John