Another Option Button Question

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

Is there a way to make an option button switch to the
oppisite of what it was originally? For example I have 3
option buttons. If I click on one I need the other two to
switch to the oppisite of what they were, either on or off.

I have looked into the Switch command in Visual Basic and
the expression builder, but cant seem to make it work.

Thanks for the help.
 
Try something like this in the OnChange event and assume
the option values are 1 for On and 2 for Off:

Dim i as Integer
i = [optOption1]

Select Case i
Case 1 ' value = On
[optOption2] = 2 ' Off
[optOption3] = 2 ' Off
Case 2 ' value = Off
[optOption2] = 1 ' On
[optOption3] = 1 ' On
End Select

Hope this helps!

Howard Brody
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top