Tu crées un userform avec combobox1, label1 et label2
sur feuil1:
colonne A: nomphoto
colonne B: lieu
colonneC:date
Dim DerniereLigne As Integer
Dim i As Integer
Private Sub ComboBox1_Change()
Dim PhotoSelect As String
Dim j As Integer
PhotoSelect = ComboBox1.Text
For j = 1 To DerniereLigne
If Worksheets("Feuil1").Cells(j, 1).Value = PhotoSelect Then
Label1.Caption = Worksheets("Feuil1").Cells(j, 2).Value
Label2.Caption = Worksheets("Feuil1").Cells(j, 3).Value
End If
Next
End Sub
Public Function PremiereLigneVide(ByVal Colonne As Integer) As Integer
PremiereLigneVide = Worksheets("Feuil1").Columns(Colonne).Find("").Row
DerniereLigne = PremiereLigneVide - 1
End Function
Private Sub UserForm_Initialize()
Worksheets("Feuil2").Activate
PremiereLigneVide (1)
For i = 1 To DerniereLigne
Dim Itemi As String
Itemi = Worksheets("Feuil1").Cells(i, 1).Value
ComboBox1.AddItem (Itemi)
Next
End Sub
Et pour afficher le userform à l'ouverture dans Thisworkbook:
Sub Workbook_open()
UserForm1.Show
End Sub
Drikce 06