Gopra was telling us:
Gopra nous racontait que :
> Is it possible to check all the check box by using loop instead of
> type all (like checkbox1.value = true
> checkbox2.value = true)
This code will display a userform (originally called "UserForm1") with all
its checkboxes set to true. Just make sure you have a button with the
"Me.Hide" statement behind it.
'_______________________________________
Sub TestUserForm()
Dim frmTest As UserForm1
Dim i As Long
Set frmTest = New UserForm1
Load frmTest
With frmTest
For i = 0 To .Controls.Count - 1
If TypeOf .Controls(i) Is MSForms.CheckBox Then
.Controls(i).Value = True
End If
Next
.Show
'Other code...
End With
Unload frmTest
Set frmTest = Nothing
End Sub
'_______________________________________

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org