hi,
I tring to get the items that a user selected in in a list box. These are hard coded values in the box(they do not want to use a table). They want them to be able to select more than one itme. So I need to be able to grab and store the text in an array or variables. I have this code but so far it does not work. When it gets to to the item it showsit as having a NUll value, and passes by it. It also goes forever and I would have expected the auto increment.
Can someone please tell me what I am doing wrong.
Thank you
Here is my code:
Dim st As String
Dim a() As String
Do While listPOS.ListCount
ReDim a(listPOS.ListCount)
If listPOS.ListIndex >= 0 Then
If listPOS.Value <> Null Then
a(listPOS.ListCount) = listPOS.Value
txtCONTRACT_NAME = a(listPOS.ListCount)
End If
End If
I tring to get the items that a user selected in in a list box. These are hard coded values in the box(they do not want to use a table). They want them to be able to select more than one itme. So I need to be able to grab and store the text in an array or variables. I have this code but so far it does not work. When it gets to to the item it showsit as having a NUll value, and passes by it. It also goes forever and I would have expected the auto increment.
Can someone please tell me what I am doing wrong.
Thank you
Here is my code:
Dim st As String
Dim a() As String
Do While listPOS.ListCount
ReDim a(listPOS.ListCount)
If listPOS.ListIndex >= 0 Then
If listPOS.Value <> Null Then
a(listPOS.ListCount) = listPOS.Value
txtCONTRACT_NAME = a(listPOS.ListCount)
End If
End If