I am working on a project that requires me to disable certain option buttons in excel 2010 based on the results of prior option buttons. Some criteria will need multiple if statements, similar to a nested if. Some info; cell B107 in my example reflects which of the 5 option buttons they might have chosen. I have tried the following code but I have not been able to find success. Additionally, how would I make the disabled option button appear grey.
Private Sub OptionButton22_Change() If Range ("B108") = 1 Then OptionButton22.Enabled = False Else OptionButton22.Enabled = True End If End Sub
Aucun commentaire:
Enregistrer un commentaire