I have a form with 10 option buttons in one frame. My OKButton for the form needs to check that one of them has been checked before hiding the form to do stuff with according to which button has been checked.
I can use a line for each:
If OptionLeave then OK = true
IfOptionSick then OK = true
...
if not OK then
nag user
exit sub
or use a single line
if not optionLeave or OptionSick or .... then
nag user
exit sub
It's similar using the results:
If OptionLeave then DoThis
IfOptionSick then DoThat
etc.
Is there a more elegant way of doing it?
I can use a line for each:
If OptionLeave then OK = true
IfOptionSick then OK = true
...
if not OK then
nag user
exit sub
or use a single line
if not optionLeave or OptionSick or .... then
nag user
exit sub
It's similar using the results:
If OptionLeave then DoThis
IfOptionSick then DoThat
etc.
Is there a more elegant way of doing it?