"kimiraikkonen" <ki*************@gmail.comwrote in message
news:11*********************@v2g2000hsf.googlegrou ps.com...
Hi,
I'm trying to do a batch process for all the items in my listbox1
using "for each...next" ? I'm not well-experienced on this yet, how
can i sample this?
For example: From item1 to last item (there's no guess for how many
items a user can add as well),
I want my external process run one by one. Process must run for item1
then item2 when item1's work finishes....until the last listbox item.
How can i do that?
Thanks.
Each item in the listbox is an object and uses the tostring property to
display the item.
So you would do the following:
for each li as (your object type or string if you stored them that way) in
listbox1.items
' within the loop you will process each item.
' lets say you store the execute path of the process you want to start
so li would be a string
dim yourProcess as Process
yourProcess = Process.Start(li)
yourProcess.WaitForExit()
next
Has no error checking but I would not want you to lose out on some of the
fun.
Hope this helps
Lloyd Sheen