listbox with checkbox and multi-select

Seem to be having trouble determining which checkboxes are selected, the form has the listbox and a command button. I'm populating the listbox with an array:

for names=1 to userNum-1
list1.additem (UserTxt(names,0))
next names

When I click the Command Button, I would like to place the text from the checked items into another array:

selectedRecip(x)=list1.text.

However, I cannot seem to find a way to test the boolean value of each item in the list... I'm stumped, and the posts I've seen are completely greek to me. So if this question has been handled, I'm sorry.
[638 byte] By [treitus] at [2007-11-18 2:12:41]
# 1 Re: listbox with checkbox and multi-select
Hi

The following code may be a clue for you to try.

Private Sub Command1_Click()
x = List1.ListCount
For y = 0 To x - 1
If List1.Selected(y) = True Then
MsgBox List1.List(y) 'or copy to array
End If
Next
End Sub

Instead of Msgbox you can put the code for copying to another array.

Thanks
DBalaji at 2007-11-10 0:02:33 >
# 2 Re: listbox with checkbox and multi-select
thanks for the help. I tried the list1.selected() before and had no success, but it seemed to work fine now.
treitus at 2007-11-10 0:03:33 >