I'll give you something to get started with. VB.NET stores controls in controls collections, so you can't have a control array (of checkboxes) like in VB6. Here's an example, how to loop a control collection and check the name property if the control is a checkbox
Dim oCtrl As Control
For Each oCtrl In Me.Controls
If CType(oCtrl, CheckBox).Name = "GCS" Then
For storing the points, I would use control's Tag property.
2- If that is a form and the checkbox is static, why don't he count them manually?
Manually? You mean if there's a fixed amount of the checkboxes? Then the summing could be done without looping the controls collection. You're right about that. I'm not familiar with GCS, that's why I suggested a "dynamic" solution i.e. the number of the GCS qualities and thus the number of the checkboxes is not fixed.
3- your code will work just fine if he you want to count the checkbox in a form dynamically, but I suggest using this single line instead of the IF
Nice! I wasn't familiar with that syntax :) But CType(_oCtrl, CheckBox) is still needed to get properties of the checkbox control.
Or he can use LINQ
That's a question of the compatibility. I target and test the code with .NET 2.0 and VB.2005. And there's also a lot of user's still using VB.2003. AFAIK LINQ came with .NET 3.5.
1- It could be a vb.net automated word document and then he want to count them :)
;) Well, let's wait for Dawnie's comment and some code.
For Each _oCtrl As Control In Me.Controls.OfType(Of CheckBox)()
I tried to use that syntax with VB.2005. Controls collection does not have OfType method in .NET 2.0. So I (still) suggest using CType(_oCtrl, CheckBox) syntax for the compatibility with pre 3.x versions of .NET.