Full Version: Loop Throug Listbox in VBA
UtterAccess Forums > Microsoft® Access > Access Forms
jmbro10
Hello,
Need quick pointer to loop through my listbox in VBA....for example if I do the following how do I reference the listbox row? I know I've done it before but am drawing a blank!
For i = 0 To lstTickets.ListCount
do something with: lstTickets.Column(1)
Next i
Thanks!!
HiTechCoach
Try something like:

CODE
For i = 0 To lstTickets.ListCount - 1
nbsp;  Msgbox   Me.lstTickets.Column(1, i)
Next I
jmbro10
THAT's IT!! Thanks!
HiTechCoach
You're welcome!
Glad we could assist. sad.gif
uarulez2.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.