Option Explicit
Private Sub CommandButton_suivant_Click()
Dim p As MSForms.Page, c As Control, i As Integer, X As Long
X = Columns(20).Find("", Cells(Rows.Count, 20), xlValues, , 1, 1, 0).Row 'Première ligne
For Each p In Me.MultiPage_KE.Pages
For Each c In Me.MultiPage_KE.Pages(p.Name).Controls
If TypeName(c) = "CheckBox" Then If c Then i = i + 1
Cells(X, Cells(X, 20).Resize(, Columns.Count).Find("", Cells(X, Columns.Count), xlValues, , 2, 1, 0).Column) = c.Caption
Next c
Next p
If i = 0 Then
Call MsgBox("Vous n'avez coché aucun system defects", vbExclamation, Application.Name)
Exit Sub
End If
If i > 4 Then
Call MsgBox("Vous avez coché plus de 4 system defects", vbExclamation, Application.Name)
Exit Sub
End If
If 1 < i < 4 Then
Unload Me: reporter_un_incident_part3.Show
Exit Sub
End If
End Sub