I have a code that work just fine using ActiveX option buttons. However, I want the macro to run on a Mac as well so I am trying to replace my ActiveX controls with form controls. With ActiveX, all I had to do in order to check if one of my two option buttons was selected is:
Sub OptionButton1_Click
If OptionButton1.Value = true then
(action...)
End if
End sub
I have been trying to find an equivalent for Form Controls on Google but each time I get an:
Object required error
Thank you very much for your answers @L42 and @Sai Nishank! Now what if I want to check in an OptionButton_Click if an option button from an other group is true ? I tried this syntax but I get an error message : "Compile error Method or Data not found"
Sub USDButton_Click()
MsgBox "USD"
If Sheet1.BTUButton = True Then
(action1)
End If
If Sheet1.kWhButton = True Then
(action2)
End If
I am not sure if BTUButton is the correct name of the button, but I don't where to check, form controls don't have that handy "Right Click > Properties" like ActiveX