Controls: Radio Buttons


  • RadioButton controls are used to display options from which the user selects only one. 
  • All RadioButton controls added to a form become part of the same group. 
  • When a user selects a RadioButton , the other RadioButton controls in the same group are automatically unavailable. 
  • To specify one RadioButton as the default, set the Checked property to True at design time.

RadioButton controls have the value True or False.  To check the value of an option button in a Select Case statement use code like:

Select Case True
     Case optReserved.Checked
          Call bookReserved ( theater( ), availableSeats )
     Case optGeneral.Checked
          Call bookGeneral ( theater( ), availableSeats )
End Select

The values can also be checked in an If statement.


RadioButton Control in Visual Basic .NET (replaces OptionButton)