Bonsoir le forum
J'aimerai savoir le nombre de checkbox = true sur le userform Options .
Voir piece jointe
Private Sub CommandButton1_Click()
Dim Options As Form
Set Options = Me
Dim ctl As Control
nb = 0
For Each ctl In Options.Controls
If ctl.Value = True Then
nb = 1 + nb
End If
Next ctl
MsgBox nb
End Sub
merci
Merci [file name=ForEachControlCombienDeTrue.zip size=7692]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/ForEachControlCombienDeTrue.zip[/file]
J'aimerai savoir le nombre de checkbox = true sur le userform Options .
Voir piece jointe
Private Sub CommandButton1_Click()
Dim Options As Form
Set Options = Me
Dim ctl As Control
nb = 0
For Each ctl In Options.Controls
If ctl.Value = True Then
nb = 1 + nb
End If
Next ctl
MsgBox nb
End Sub
merci
Merci [file name=ForEachControlCombienDeTrue.zip size=7692]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/ForEachControlCombienDeTrue.zip[/file]