有人知道如何从listbox
填写array
吗?我只知道方法:
With Tabelle1.ListBox1
.AddItem "Versuch"
End With
我想制作dynamic listbox
,但仍然不知道。
答案 0 :(得分:1)
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