Hello,
I'm having trouble with my option buttons.
I have four option buttons label opt1, opt2, opt3 and opt4.
What is the code so that only opt1 and opt2 is right?
I would like the opt1 and opt2 equals to
DayAttend = True
Thanks in advance
Printable View
Hello,
I'm having trouble with my option buttons.
I have four option buttons label opt1, opt2, opt3 and opt4.
What is the code so that only opt1 and opt2 is right?
I would like the opt1 and opt2 equals to
DayAttend = True
Thanks in advance
You gatta explain a little more then that, Becuase when you use
options buttons, if they are all on the same object you can only select one. And explain a little more on exactly what you are trying to do what is right?? what do you mean by that?
hi,
what i mean is that there's four option button and the user can only choose one at a time. But i want it to be so that of all of the option that's available, only two of them is acceptable.
You have 4 options buttons, but only two are available for selection??
Is this the goal?
If so, what purpose do the other two option buttons serve?
Or, do you have 4 options buttons, but you want them grouped into twos, i.e., between option1 and option2, you can chose one, and between option 3 and option 4 you can chose one? Is this it?
Here you go:
VB Code:
Private Sub Command1_Click() Dim DayAttend As Boolean If Opt1 = True Or Opt2 = True Then DayAttend = True MsgBox DayAttend 'To check the result End Sub