Private Sub CommandButton2_Click()
' Paramètrage
Const Ligdep As Long = 3 ' première ligne
Const Ligtitre As Long = 2 ' ligne avec titre
Const Coldep As String = "B" ' première colonne
Const nbcol As Long = 4 ' nb de colonne
' variables
Dim I As Long
Dim Ligfin As Long
Dim Cellule As Range
With Sheets(ActiveSheet.Name)
For Each Cellule In .Range(Coldep & Ligdep & ":" & Coldep & .Range(Coldep & .Rows.Count).End(xlUp).Row)
' pour toutes les cellules non vide de la colonne avec les noms
If Cellule <> "" Then
For I = 1 To nbcol - 1
If Cellule.Offset(0, I) = "" Then
Select Case MsgBox("La colonne pour le : " & .Cells(Ligtitre, Cellule.Offset(0, I).Column) _
& vbCrLf & "n'est pas remplie" _
& vbCrLf & "" _
& vbCrLf & "Nom : " & Cellule.Offset(0, 0) _
& vbCrLf & "Prénom : " & Cellule.Offset(0, 1) _
& vbCrLf & "Age : " & Cellule.Offset(0, 2) _
& vbCrLf & "Sexe : " & Cellule.Offset(0, 3) _
& vbCrLf & "" _
& vbCrLf & "Voulez vous corriger ? : Oui" _
& vbCrLf & "" _
& vbCrLf & "Non : pour continuer" _
& vbCrLf & "Annuler pour quitter la recherche" _
& vbCrLf & "" _
& vbCrLf & "" _
& vbCrLf & "" _
, vbYesNoCancel Or vbInformation Or vbDefaultButton1, Application.Name)
Case vbYes
Cellule.Offset(0, I).Activate
Exit Sub
Case vbNo
Case vbCancel
Exit Sub
End Select
End If
Next I
End If
Next Cellule
End With
End Sub