Help! List Check List Boxes 
Author Message
 Help! List Check List Boxes

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



Thu, 24 Aug 2000 03:00:00 GMT  
 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?



Thu, 24 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help wanted with file list boxes and list boxes

2. Check for checked values in List Box

3. Simple Q - Check boxes in list boxes

4. Check boxes in List Boxes

5. VB4(List Box-Check Box)

6. List Box with Check Box Controls Inside

7. List Box with Check Boxes

8. List box Check box

9. How to list macro names in a combo box or a list box

10. VB List Box Versus Access List Box

11. Q: List Box to List Box Code

12. List box within List box

 

 
Powered by phpBB® Forum Software