Private Sub UserForm_Initialize()
Dim Li As Long
Dim ws As Worksheet
Dim Col As Byte
Dim Lig As Long
Listclient.ListItems.Clear
Listclient.ColumnHeaders.Clear 'nettoyage des colonnes de la listview
With Listclient
.View = 3
.Gridlines = True
.FullRowSelect = True
.Sorted = True
With .ColumnHeaders
.Add , , "civilité", 40
.Add , , "nom", 80
.Add , , "Prénom", 80
.Add , , "Adresse", 80
.Add , , "Complément", 80
.Add , , "C.P", 50
.Add , , "Ville", 80
.Add , , "Téléphone", 50
.Add , , "Mail", 50
End With
End With
select_cli.Caption = "Sélection d'un client"
With Listclient
'Lignes de la 1ere colonne
With .ListItems
For Lig = 2 To 8
.Add , , Sheets("client").Cells(Lig, 1).Value
Next
End With
'Remplissage des lignes autres colonnes
For Lig = 1 To 7
For Col = 2 To 10
.ListItems(Lig).ListSubItems.Add , , Sheets("client").Cells(Lig + 1, Col).Value
Next Col
Next Lig
End With
'Listclient.View = lvwReport
End Sub