?
Solved

VB radio button deselect

Posted on 2007-08-09
7
Medium Priority
?
2,197 Views
Last Modified: 2013-12-26
Easy question, pretty much what the title says.

Have a reset button on a form and I want the previously selected radio button to become unselected.

Anyone know how?
0
Comment
Question by:bdb12
  • 3
  • 2
  • 2
7 Comments
 
LVL 39

Expert Comment

by:appari
ID: 19660424
try

radiobutton.value=false
0
 

Author Comment

by:bdb12
ID: 19660586
Nah value is not a member of the class
0
 
LVL 15

Accepted Solution

by:
JackOfPH earned 2000 total points
ID: 19661069
 RadioButton1.Checked = False
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Expert Comment

by:JackOfPH
ID: 19661097
Private Sub ResetRadioButton()

Dim rd As RadioButton
        For Each ctrl As Control In Me.Controls
            If TypeOf (ctrl) Is RadioButton Then
                rd = ctrl
                If rd.Checked = True Then
                    rd.Checked = False
                End If
            End If
        Next

end sub
0
 
LVL 39

Expert Comment

by:appari
ID: 19661225
are you using vb.net?
this zone is for vb6.0 or earlier versions.
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 19666978
Just call the sub procedure like this:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

'****This call the sub ResetRadioButton posted earlier *******

ResetRadioButton()

End sub
0
 

Author Comment

by:bdb12
ID: 19667682
Cool checked() is what I was after.

Thanks for the tips with the radiobutton reset function - that's really handy



0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question