mario201066
XLDnaute Nouveau
Bonjour, Moi aussi j'aimerai créé une ListBox a 2 ou 3 colonnes car mes données pour une colonnes sont trop longue (contient 70 choix) et c'est pas esthétique! par le fait meme, faut que je puisse quand même sélectionner des éléments de la colonne 2 et 3, je vous demande votre aide svp, voici une partie de mon code:
Private Sub UserForm_Initialize()
Dim ws
With Me
Me.ListBox1.ColumnCount = 3
Me.ListBox1.ColumnWidths = "150;150;150"
.ComboBox1.List = ThisWorkbook.Sheets(1).Range("A1:A9").Value
.ComboBox1.ListIndex = 0
For Each ws In ActiveWorkbook.Sheets
If ws.Visible = True Then
.ListBox1.AddItem (ws.Name)
End If
Next ws
.ListBox1.IntegralHeight = True
End With
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (70)
ListBox1.RemoveItem (70)
Private Sub UserForm_Initialize()
Dim ws
With Me
Me.ListBox1.ColumnCount = 3
Me.ListBox1.ColumnWidths = "150;150;150"
.ComboBox1.List = ThisWorkbook.Sheets(1).Range("A1:A9").Value
.ComboBox1.ListIndex = 0
For Each ws In ActiveWorkbook.Sheets
If ws.Visible = True Then
.ListBox1.AddItem (ws.Name)
End If
Next ws
.ListBox1.IntegralHeight = True
End With
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (0)
ListBox1.RemoveItem (70)
ListBox1.RemoveItem (70)