Option Explicit
Dim RgTI As Range ' Variable globale de type Range
Private Sub UserForm_Initialize()
Set RgTI = [TABLE_INDEX]
CbxRéf.List = RgTI.Columns(1).Value
End Sub
Private Sub CbxRéf_Change()
Dim Ligne As Long, Genre As String, Cultivar As String, RéfFic As String
If CbxRéf.ListIndex < 0 Then Exit Sub
Ligne = CbxRéf.ListIndex + 1
Genre = RgTI(Ligne, "D").Value
Cultivar = RgTI(Ligne, "E").Value
RéfFic = RgTI(Ligne, "F").Value
TbxRép.Text = Genre & " " & Cultivar
On Error Resume Next
Image1.Picture = LoadPicture(RéfFic)
End Sub
Private Sub BtnQ_Click()
Unload Me
End Sub