I've found examples that are very close to mine but still haven't solved what I'm trying to do.
Using ActiveX controls.
I have radio buttons linked to cells with If statements to adjust accordingly. For example:
A1 = "Yes"
Option Button 1 is linked to cell B2. B2 = IF(A1="Yes",TRUE,FALSE)
Option Button 2 is linked to cell B3. B3 = IF(A1="Yes",FALSE,TRUE)
So the option buttons are adjust accordingly. I originally just physically selected the option buttons. On selecting the option buttons, I had code that hid rows. But that was based on the onClick action. My code was:
Is there a way to tweak this code to fire if the value changed rather than me having to physically click on the radio buttons to fire the code? Thanks!
Using ActiveX controls.
I have radio buttons linked to cells with If statements to adjust accordingly. For example:
A1 = "Yes"
Option Button 1 is linked to cell B2. B2 = IF(A1="Yes",TRUE,FALSE)
Option Button 2 is linked to cell B3. B3 = IF(A1="Yes",FALSE,TRUE)
So the option buttons are adjust accordingly. I originally just physically selected the option buttons. On selecting the option buttons, I had code that hid rows. But that was based on the onClick action. My code was:
VBA Code:
Private Sub OptionButton1_Click()
If OptionButton1 = True Then
Worksheets("Sheet A").Rows("62").EntireRow.Hidden = True
Worksheets("Sheet A").Rows("61").EntireRow.Hidden = False
End If
End Sub
Is there a way to tweak this code to fire if the value changed rather than me having to physically click on the radio buttons to fire the code? Thanks!