473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB 2005 RadioButtons

I have a VB 2005 form with 140 different radiobuttons...

Some are "checked", some are not...

I want to reset all radiobuttons to "unchecked".

I've been searching and trying differnet things...there must be a way to access radiobuttons by their "names"...

Typical names used include...
RadioButton011
RadioButton012
RadioButton013
...
RadioButton285

28 rows of 5 radiobuttons = 140 radiobuttons

I would like to cycle through the radiobutton list via 2 nested loops to inquire the status of each radiobutton...

Is there a way to concatenate the name of the radiobutton?????

Typical code to do the inquiry would be as follows...

For I = 1 to 28
For I2 =1 to 5
if ("RadioButton" & I & I2).checked = True then
...do something...
next I2
next I

I'm stuck now for 3 days...need help...all help appreciated!

Pete
Dec 20 '07 #1
4 1691
Killer42
8,435 Expert 8TB
I don't use VB2005, but have you tried looking for a Controls collection? That's what was used in VB6.
Dec 20 '07 #2
I have tried using the CONTROLS method...but there is something "special" about radiobuttons...it doesn't seem to recognize radiobuttons...

Still stuck!!
Dec 20 '07 #3
daniel aristidou
491 256MB
Have you tried creating a function ?.......else use array.
Dec 20 '07 #4
Killer42
8,435 Expert 8TB
There are a number of earlier discussion threads here in the VB forum which cover the topics of simulating control arrays in the various .Net versions of VB, and accessing controls by variable names. Here are a few you can try...

http://www.thescripts.com/forum/thre...rol+array.html
http://www.thescripts.com/forum/thre...rol+array.html
http://www.thescripts.com/forum/thre...rol+array.html
http://www.thescripts.com/forum/thre...rol+array.html
http://www.thescripts.com/forum/thre...rol+array.html

Note, some words will be highlighted because these links were the result of a search on "simulate control array".
Dec 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
1
by: --=|3s|=-- | last post by:
Hi, I'm trying to create a form in VISUAL BASIC .NET wich shows values of records from a customers table. For example a form wich shows the name, surname and sex of a person. For the name &...
11
by: Rourke Eleven | last post by:
I have looked and searched. What good is the databind property on Radiobuttons? How does one go about actually using it? What is a good resource on this? I understand that I can easily get/set...
2
by: Chris Ashley | last post by:
I have a couple of RadioButtons both with the same GroupName. Is there any way I can use a RequiredFieldValidator to ensure that at least one of the RadioButtons in the group is selected? Setting...
4
by: news.microsoft.com | last post by:
Hello, I have two databound radiobuttons which have advanced databinding properties of onpropertychanged enabled so that I can raise the columnchanged event whenever the radiobuttons are...
0
by: PaulS | last post by:
Hello! I put on Form PictureBox and I set big image. Next I put many radiobuttons (80) on PictureBox, but I have problem. I want that 10 radiobuttons have own Checked, next part of 10...
8
by: =?Utf-8?B?UmljaA==?= | last post by:
If you enclose a group of radiobuttons (option buttons in MS Access) in an option group control (a frame control) in Access -- the frame control will return the index of the option button that is...
0
by: | last post by:
I am using radiobuttons in a gridview, and not a column of radiobuttons. I have one cell in each row with several radiobuttons that the user has to choose a radiobutton within each row. How can I...
1
by: acrolo | last post by:
Please help! I have a college assignment which requires me to create a DVD data capturer using the DataGridView but i am struggling to understand how to get my program to capture the data from my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.