1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
Dim Lig As Long, Nom As String, Line As Long, Col As Long, LignSel As Long
Nom = InputBox("Saisie de votre NOM : ", "NOM")
If Nom = "" Then
Exit Sub
Else
With Sheets("RECUP").Range("a1:a500")
Set C = Sheets("RECUP").Range("A2:A200").Find(What:="" & Nom & "", LookAt:=xlWhole, SearchOrder:=xlByColumns)
If Not C Is Nothing Then
Do
Set C = .FindNext(C)
C.Activate
MsgBox Range("" & "A" & ActiveCell.Row & "").Value & " H: " & Range("" & "ED" & ActiveCell.Row & "").Value & " E: " & Range("" & "EE" & ActiveCell.Row & "").Value & vbCr & vbCr & Range("" & "EG" & ActiveCell.Row & "").Value
Exit Sub
Loop While Not C Is Nothing
End If
End With
End If
End If
End Sub |