View Full Version : Toggle an Option


HowardChr
06-21-2007, 06:32 AM
Say I have two bubbles (options,buttons, whatever you know them as) I want the system to be set up so that only one of the two can be "true" at a time. Say they are titled Option1, and Option2. What code would I put on them so only one can be "true" at a time. If Option1 was true, and then someone clicked on option2, I want it to cause option 1 to go false.

Any help would be greatly appriciated. THANK!

HowardChr
06-21-2007, 06:38 AM
Ooop... I figured it out. You have to go into the first option and put the following:

<code>
If Option1 = True Then
Option1 = False
Option2 = True
End If
</code>

And vise versa on the other option.

Dennisk
06-21-2007, 10:40 PM
use a group option

John_W
06-21-2007, 11:41 PM
If you have 2 radio buttons in a group, they will automatically work in this way.

Nicest way of toggling a Boolean variable is to say Option1 = Not(Option1)