0
votes

I am trying to disable a question set, with a "No" answer from the previous question. I am using all ActiveX Option Buttons in the worksheet.

The user will be asked a yes / no question. If no is selected, I want to disable the next question. Here is what I have so far:

Private Sub OptionButton1()
   If OptionButton1.Value = True Then
        OptionButton3.Enabled = True
        OptionButton4.Enabled = True
    Else
        OptionButton3.Enabled = False
        OptionButton4.Enabled = False
    End If
End Sub

It is not working. Thanks for the help.

1

1 Answers

2
votes

Have you tryed to use event "Change"?

Private Sub OptionButton1_Change()
   If OptionButton1.Value = True Then
        OptionButton3.Enabled = True
        OptionButton4.Enabled = True
    Else
        OptionButton3.Enabled = False
        OptionButton4.Enabled = False
    End If
End Sub

So the code will be called on every change of the first option button