I created a userform in VB6, placed Frame1 on it and then added 26 checkboxes (each one has its own code and is working) and 3 commandbuttons (ok, cancel, check all) on the frame. Everything is working the way i need it except the check all button. I have tried doing this several ways and just can't get anything to work.
After the command button "OK" is pressed it will run the code for each check box that = true. I also have a cancel command button that works.
I am trying to add a commandbutton/checkbox (have tried both) that will check but have been unsuccessful with either button or calls. I could do it the long way by setting each checkbox# = true, but never imagined this would take so long.
Current code (x is always false??):
Expand|Select|Wrap|Line Numbers
- Private Sub CommandButton3_Click ()
- Dim x as Control
- For each x in Userform1.Frame1.Controls
- If TypeOf x is CheckBox then
- x.value = true
- End if
- Next
- End Sub
Scott