Salut Jean mi,
Tiens voici un petit bout de code qui fait ce que tu souhaites :
Code:
Sub Macro1()
Dim i As Integer
For i = 5 To Range('A65536').End(xlUp).Row
If Cells(i, 2).Value = '' Then
MsgBox 'Vous avez oublié de taper un prenom', vbExclamation, 'Attention'
Cells(i, 2).Select
Exit Sub
End If
Next i
Sheets('Feuil1').Select
End Sub
Par contre si tu veux que ca fonctionne pour les deux colonnes, utilises celui-ci :
Code:
Sub Macro1_bis()
Dim i As Integer
For i = 5 To Range('A65536').End(xlUp).Row
If Cells(i, 2).Value = '' Then
MsgBox 'Vous avez oublié de taper un prenom', vbExclamation, 'Attention'
Cells(i, 2).Select
Exit Sub
End If
Next i
For i = 5 To Range('A65536').End(xlUp).Row
If Cells(i, 1).Value = '' And Not Cells(i, 2).Value = '' Then
MsgBox 'Vous avez oublié de taper un nom', vbExclamation, 'Attention'
Cells(i, 1).Select
Exit Sub
End If
Next i
Sheets('Feuil1').Select
End Sub
@+