Cycling through a listbox or others

Use this board to post your code snippets - tips and tricks
3 posts Page 1 of 1
Contributors
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

Cycling through a listbox or others
NoWayIn
Hi All, Again :]
This little snip I'm about to show you guys will Cycle through a Listbox or other tools.
What this code does is it go though the selected object.

For this example add 1 listbox and 1 button
for the listbox items put
1
2
3
4
5
inside

for the button, put this code in it
Code: Select all
For i As Integer = 0 To Listbox1.Items.Count - 1
MsgBox(ListBox1.Items(i))
Next
What the above code will do is that it will show a MsgBox saying 1,2,3,4,5

and that's how you Cycle through a listbox
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

great snip again :)
Image
User avatar
Insignia
VIP-Member
VIP-Member
Posts: 238
Joined: Thu Feb 11, 2010 5:15 pm

Oh this is probably useful in making ChocoScan's Folder Scan *Hint*
3 posts Page 1 of 1
Return to “Quick Snips”