Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27184

VS 2012 [RESOLVED] Setting a condition for each radio button checked in a form??

$
0
0
Hi

Fairly new to programming in general. Just wanted to know if anyone could help me out with something i'm trying to do in VB. Basically, I have 27 radio buttons on a form, separated in to 3's. I have an integer variable that I would like to increase by 1 for every radio button that is selected in the form.

I'm aware that I could do this by writing an IF statement for each individual radio button whereby if radiobutton.checked = true then + 1 to variable......but like I said, I have 27 of them. I'm thinking there must be a faster way to do this that would cut down the amount of code. A piece of code that would do something like this.......

variable = number of radiobuttons selected

Any help would be greatly appreciated.

Thanks, Jamie.

Viewing all articles
Browse latest Browse all 27184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>