Check boxes in VB

In VB for check boxes:
1.Where do you write the code (under the chkbox or the cmdbutton?)
2.If you have a no. of boxes and each returns a value which are added for a total how do you structure the code?Examples please.Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1) You can write the code both under Check box and Command button. Both of them are having events.

2) I think you are going to have the value displayed in the caption. So whenever you click a check box if the ctatus is vbChecked add the value to a public variable and if vbUnChecked detuct the value.
1.If you want activate form like :
  If the user checks in the CheckBox  
  then in the same second somthing  
  append .then you sould write the code
  in the CheckBox .other you will write
  the code in the CommandButton . can use the CheckBoxes as Boolean
  sample :
  dim bCheck as boolean


 or you can ask about that in the IF sentance :

  if CheckBox1 then ...

                        Yuval Amir

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.