This documentation is archived and is not being maintained.

Visual Basic Reference

Visual Studio 6.0

CheckBox Control

See Also    Example    Properties    Methods    Events

A CheckBox control displays an X when selected; the X disappears when the CheckBox is cleared. Use this control to give the user a True/False or Yes/No option. You can use CheckBox controls in groups to display multiple choices from which the user can select one or more. You can also set the value of a CheckBox programmatically with the Value property.




CheckBox and OptionButton controls function similarly but with an important difference: Any number of CheckBox controls on a form can be selected at the same time. In contrast, only one OptionButton in a group can be selected at any given time.

To display text next to the CheckBox, set the Caption property. Use the Value property to determine the state of the controlselected, cleared, or unavailable.