I have a listbox in access form. it contains 18 items . How do i store those itmes into array using access vba.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The following will pull the contents of a listbox into an array and spit back out the contents.
Dim Size As Integer
Size = Me.List0.ListCount - 1
ReDim ListBoxContents(0 To Size) As String
Dim i As Integer
For i = 0 To Size
ListBoxContents(i) = Me.List0.ItemData(i)
Next i
For i = 0 To Size
MsgBox ListBoxContents(i)
Next i