How to choose only one radiobutton??

iypa

New member
Joined
Apr 28, 2011
Messages
2
Programming Experience
Beginner

i already write below coding on my code site..

If rdb1.Checked = True Then
MsgBox("You will depart in the morning at 10.00am")

ElseIf rdb2.Checked = True Then
MsgBox("You will depart o the evening at 04.00pm")
End If

when user choose..ex:destination..user still can select both radiobutton..
i want the radiobutton can be select one only,
 
You've posted in the Windows Forms forum and you're using MsgBox so presumably there is no "site". RadioButtons are specifically designed such that only one in any particular container, i.e. parent control, can be checked at a time. If you are really able to select multiple RadioButtons then they must be in different containers. Move all the RadioButtons you want to act as a set into the same container. A container might be a GroupBox, Panel, the form itself, a TabPage or any other control that can contain child controls.
 
Back
Top