Does anybody know how can i fill a listbox from an array? I only know the method with:
With Tabelle1.ListBox1
.AddItem "Versuch"
End With
i want to make a dynamic listbox but still have no idea.
Sub Listbox_Things()
'My Listbox is called "Listbox1" and it is located on "Sheet1"
'With the Listbox visible, F8 through this code
With Sheet1.ListBox1
.List = Split("1,2,3", ",")
.Clear
.List = Array("One", "Two", "Three")
.Clear
.List = Array(1, 2, 3)
.Clear
Dim x() As Variant
x = Array("One", "Two", "Three")
.List = x
.Clear
.List = Application.GetCustomListContents(4)
End With
End Sub
Listproperty, e.g.,Tabelle1.ListBox1.List = myArray.