Question Loop an array

smaz

New member
Joined
May 29, 2009
Messages
1
Programming Experience
Beginner
Hey, ive recently started playing around with VB and im now stuck with this loop.

Ive created an array, and when i fill in the information and press a button, i want the information in the array to appear in a listbox.
This loop will put the first bit of information in the listbox, then when i press the button again, it will put the next information in the listbox.

(remember, im new at this so you might need more of my code, just ask if you do :) )
Heres my code:

DIM strbookings(500) As String
DIM ARRAY_SIZE As Integer = 0


strbookings(ARRAY_SIZE) = txtName.Text & " " & txtPhone.Text & " " & txtDep.Text & " " & txtReturn.Text & " " & lblPrice.Text

ARRAY_SIZE += 1
'end of code


with this information, i just needa no a 'for loop' command so that i can keep adding information to the list box

Again, if you need more code plz ask :)
thanks
 
First up, please post in the most appropriate forum for the topic. VS.NET is for IDE issues, not language issues. Moved.

As for the question, read the documentation first, then search the web.

for loop - MSDN Search
[ame="http://www.google.com.au/search?q=for+loop+vb.net&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:eek:fficial&client=firefox-a"]for loop vb.net - Google Search[/ame]
 
Back
Top