
Help! List Check List Boxes
Quote:
>I have a list box called "lstPLants" I want to fill an array with all
>of the items in "lstPlants" that are checked.
>NOTE: the style is set to check box.
>Can someone please gimme a code example. It's quite urgent, and I'd
>appreciate any input. Thanks in advance
>-Klick
Dim arrCount,arrWhatever() as Integer
arrCount = 0
for intLoop = 0 to lstPlants.ListCount - 1
if lstPlants.Selected(intLoop) = True then
Redim Preserve arrWhatever(arrCount)
arrWhatever(arrCount) = lstPlants.List(arrCount)
arrCount = arrCount + 1
End If
Next intLoop
Something like that should do it.
On a sidenote, does anyone know if VB has any sort of increment function??? or
do I need to type var = var + 1 every time to increment its' value?