Link to home
Start Free TrialLog in
Avatar of franklinan
franklinan

asked on

How to do a For Each... Next on a CheckedListItem ? ?? ?? (URGENT)

Hi Experts...Please, heeeeeelp....Desperate....

I wanna do this :

 Dim ListEle As New "LISTITEM"   --->  LISTITEM does not EXIST

        For Each ListEle In CheckedListBox.Items
             ListEle.Selected = True
            ListEle.Checked = False
        Next

Anybody knows how to do this ? ? ? ?

The objective is to DESSELECT all THE Items on a CHECKEDLISTBOX...

Thanks !
ASKER CERTIFIED SOLUTION
Avatar of PockyMaster
PockyMaster
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of franklinan
franklinan

ASKER

Thanks ! I'll give you the points, but....do you know how to do  a "for each " of ItemsCollection ? ? Looking for another past questions I've seen things like :

For each Li as listItem in Listbox
-.......

Next

But ListITem Does not exist !

You can put whatever object into a listbox.

e.g. if you put strings inside

Iterate like:
For each s as String in ListBox1.Items

....

Next

e.g. if you put objects of class MyClass inside:

For each mc as MyClass in ListBox1.Items
...
Next