Simple ListBox Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to set up a for-loop like the one below relating to a list box. Could anyone please help me with the proper syntax? Is it possible to cycle through a list box and do things related to each item in the listbox?

FOR EACH 'item' in LISTBOX
Do stuff
Next

Thanks in advance!!!
 
Hi Matt,

Can you try if this works for you?

FOR EACH Item as datarowview in LISTBOX
Do stuff
Next

I hope this helps?

Cor
 
* "=?Utf-8?B?TWF0dA==?= said:
I would like to set up a for-loop like the one below relating to a list box. Could anyone please help me with the proper syntax? Is it possible to cycle through a list box and do things related to each item in the listbox?

FOR EACH 'item' in LISTBOX
Do stuff
Next

\\\
Dim o As Object
For Each o In Me.ListBox1.Items
...
Next o
///
 
try this:

For Each item as string In listbox.Items
'do something
Next


HTH,

gani
http://thedeveloperscorner.com.ph

-----Original Message-----
I would like to set up a for-loop like the one below
relating to a list box. Could anyone please help me with
the proper syntax? Is it possible to cycle through a
list box and do things related to each item in the
listbox?
 
Back
Top