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 !
LVL 1
franklinanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PockyMasterCommented:
For Each index As Integer In CheckedListBox1.CheckedIndices
            CheckedListBox1.SetItemChecked(index, False)

        Next

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
franklinanAuthor Commented:
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 !

PockyMasterCommented:
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

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.