Private Sub UserForm_Initialize() 'solution déjà donnée sur l'autre fil
With Sheets("Feuil1")
T = .Range("A2:M" & .Range("B65536").End(xlUp).Row).Value 'declare la plage comme ici colonnes B:K
End With
With ListBox1
.ColumnCount = UBound(T, 2)
.List = T
For i = 0 To .ListCount - 1
.List(i, [COLOR="Blue"]5[/COLOR]) = Format(.List(i, [COLOR="Blue"]5[/COLOR]), "hh:mm")
Next
End With
End Sub
Private Sub ListBox1_Click()
With ListBox1
TextBox1.Value = .List(.ListIndex, 0)
TextBox2.Value = .List(.ListIndex, 1)
TextBox3.Value = .List(.ListIndex, 2)
TextBox4.Value = .List(.ListIndex, 3)
TextBox5.Value = .List(.ListIndex, 4)
ComboBox1.Value = .List(.ListIndex, 5)
ComboBox2.Value = .List(.ListIndex, 6)
ComboBox3.Value = .List(.ListIndex, 7)
CheckBox1.Value = IIf(.List(.ListIndex, 8) = "[COLOR="Blue"]x[/COLOR]", True, False) '[COLOR="Blue"]x minuscule ![/COLOR]
CheckBox2.Value = IIf(.List(.ListIndex, 9) = "x", True, False)
TextBox6.Value = .List(.ListIndex, 10)
End With
End Sub