Private Sub cmdOK_Click()
Dim Ctrl As Integer
Dim indexList As Long
' Index de la ligne sélectionnée dans la liste
indexList = ListView1.SelectedItem.Index
With UserForm1
.TextBox[COLOR="Red"]6[/COLOR].Value = ListView1.ListItems(indexList).Text
' Boucle pour afficher le contenu de chaque textbox
For Ctrl = [COLOR="red"]7[/COLOR] To 10
.Controls("TextBox" & Ctrl).Value = ListView1.ListItems(indexList).ListSubItems(Ctrl - [COLOR="red"]6[/COLOR]).Text
Next Ctrl
End With
Unload UserForm2
End Sub