Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
With Target
If .Column = 1 And .Count = 1 Then
If .Value <> "" Then
On Error Resume Next
Set cel = [noms].Find(.Value, LookAt:=xlWhole)
If Err = 50290 Then Exit Sub
If cel Is Nothing Then Application.Undo
End If
End If
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
If .CountLarge > 1 Then Exit Sub
If .Column <> 3 Then Exit Sub
If .Row < 23 Then Exit Sub
Dim vx$: vx = .Value
If vx = "" Then [F11].Resize(8).ClearContents: Exit Sub
End With
Dim cel As Range, lig&
With Worksheets("BDD Client")
Set cel = .Columns(1).Find(vx, , -4163, 1, 1)
If cel Is Nothing Then Exit Sub
End With
Application.ScreenUpdating = 0
With [F11]
.Value = cel 'nom du client
.Offset(1) = cel.Offset(, 7) 'date de naissance
.Offset(3) = cel.Offset(, 2) 'adresse
.Offset(4) = cel.Offset(, 4) 'n° téléphone 1
.Offset(5) = cel.Offset(, 5) 'n° téléphone 2
.Offset(7) = cel.Offset(, 1) 'IP
End With
End Sub