Posted: Thu Nov 01, 2007 3:45 pm Post subject: Re: Make checked the check box using Loop
Gopra was telling us:
Gopra nous racontait que :
Quote:
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
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum