1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| [Public Sub TRI()
Sheets("XXX").Activate
Dim plage As Range
Dim rep As Range
On Error Resume Next
Application.DisplayAlerts = False
Set plage = Range("P25:P50")
Set rep = Application.InputBox("Cliquer un Nom dans la Colonne Acquéreur", "Cliquez", Type:=8)
On Error GoTo 0
Application.DisplayAlerts = True
If rep Is Nothing Then 'Controle zone de saisie vide Bouton Annuler
MsgBox "Recommencer ! "
rep = Application.InputBox("Cliquer un Nom dans la Colonne Acquéreur", "Cliquez", Type:=8)
else Exit Sub
End If
If rep = plage.Find(rep) Then 'Controle colonne de saisie
Call TRIA
Else: MsgBox "Recommencer ! "
rep = Application.InputBox("Cliquer un Nom dans la Colonne Acquéreur", "Cliquez", Type:=8)
End If
End Sub |
Partager