1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Private Sub UserForm_Initialize()
Dim Plage As Range
Dim I As Integer
With Worksheets("Feuil1")
Set Plage = .Range(.Cells(35, 8), .Cells(54, 8))
End With
With ListBox1
.ColumnCount = 5
'modifier ici les différentes largeurs
.ColumnWidths = "50;50;50;50;50"
For I = 1 To 4
'rempli la 1ere colonne
.AddItem Plage(I)
'rempli les autres colonnes
.Column(1, I - 1) = Plage(I + 4)
.Column(2, I - 1) = Plage(I + 8)
.Column(3, I - 1) = Plage(I + 12)
.Column(4, I - 1) = Plage(I + 16)
Next I
End With
End Sub |
Partager