bonjour, je suis pas très fort mais je pense que c'est comme ça :
Private Sub Image1_Click()
End Sub
Private Sub UserForm_Initialize()
[A2:H2000].Sort key1:=[B2] ' Tri la BD
Me.ChoixNom.List = Application.Transpose(Range([B2], [B65000].End(xlUp)))
Me.ChoixNom.ListIndex = 0
End Sub
Private Sub ChoixNom_Change()
[B2].Offset(ChoixNom.ListIndex, 0).Select
recupere
End Sub
Private Sub B_suivant_Click()
If Me.ChoixNom.ListIndex < Me.ChoixNom.ListCount - 1 Then
Me.ChoixNom.ListIndex = Me.ChoixNom.ListIndex + 1
[B2].Offset(Me.ChoixNom.ListIndex, 0).Select
recupere
End If
End Sub
Private Sub b_précédent_Click()
If Me.ChoixNom.ListIndex > 0 Then
Me.ChoixNom.ListIndex = Me.ChoixNom.ListIndex - 1
[B2].Offset(Me.ChoixNom.ListIndex, 0).Select
recupere
End If
End Sub
Private Sub b_fin_Click()
Unload Me
End Sub
Sub recupere()
Me.nom = ActiveCell
'-- civilité
Select Case ActiveCell.Offset(0, -1)
Case "Mme"
Me.Civilité.Controls(0) = True
Case "Mle"
Me.Civilité.Controls(1) = True
Case "M."
Me.Civilité.Controls(2) = True
End Select
Me.prenom = ActiveCell.Offset(0, 1)
Me.Marié = ActiveCell.Offset(0, 2)
Me.date_naissance = ActiveCell.Offset(0, 3)
Me.service = ActiveCell.Offset(0, 4)
Me.ville = ActiveCell.Offset(0, 5)
Me.Salaire = ActiveCell.Offset(0, 6)
Répertoire = ThisWorkbook.Path
If Dir(Répertoire & "D:\Documents excel\AAModèles tableaux\Photos\" & Me.nom & ".jpg") <> "" Then
Me.Image1.Picture = LoadPicture(Répertoire & "\" & Me.nom & ".jpg")
Else
On Error Resume Next
Me.Image1.Picture = LoadPicture(Répertoire & "D:\Documents excel\AAModèles tableaux\Photos\" & "transparent.gif")
End If
End Sub
Francky