samerickson89
New Member
- Joined
- Jun 13, 2019
- Messages
- 38
I'm trying to create a form where, if certain fields are blank, it prevents the user from printing I got most of the code to work, but I can't manage to figure out how to check whether an option button has been selected. A lot of resources I've found say to use something along the lines of
But that doesn't work at all. I've also tried
But that gives me "not checked" whether the radio button is selected or not. Then just for the heck of it I tried
Which gives me "checked" whether the radio button is selected or not. I'm at a loss here... is there a simple way to verify that a radio button has been selected? I'm using the option button under "form controls" not "ActiveX controls"
Code:
If OptionButton1.Value = True Then
MsgBox "checked"
Else
MsgBox "not checked"
End If
But that doesn't work at all. I've also tried
Code:
If OptionButton1 = True Then...
But that gives me "not checked" whether the radio button is selected or not. Then just for the heck of it I tried
Code:
If OptionButton1 = False Then...
Which gives me "checked" whether the radio button is selected or not. I'm at a loss here... is there a simple way to verify that a radio button has been selected? I'm using the option button under "form controls" not "ActiveX controls"