You should probably post this question in one of the software development forums instead of this Training and Certification forum (unless you are seeking a recommendation for a course that will teach you how to solve your problem).
Anyway, the mistake is here: If CheckBox.Checked <= 5 ...
There is no such thing as a static property "Checked" in the CheckBox class. There is aninstance property of the same name, which tells you whether ONE specific checkbox (such as checkbox1, checkbox2, etc.) is checked. There is no built-in functionality to count the number of checkboxes that are checked on a page, so you will need to count them by writing some code that iterates through all af the checkboxes incrementing a counter for each checkbox that is checked.
This is something really simple to do; you can ask in the VB.NET forum or the ASP.NET forum, but as mentioned before, the Training and Certification forum is not intended for teaching you how to code (but if you want a recommendation for a training course then it IS the proper place).