View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SS[_5_] SS[_5_] is offline
external usenet poster
 
Posts: 25
Default how to work with all items in a listbox

Hi,
I have a userform that has two listboxes. Users move selected items
from the listbox1 on the left, to listbox2 on the right. Items are
text stings like "123456 Enzyme rev 1"
Then, the user will click a command button to execute ops on items
listed in listbox2. Note that i don't want it to matter if any items
are selected (highlighted) in listbox2. I need the operation to be
executed on all the items listed in listbox2, looping through one at a
time.

The value (variable) i need for an ensuing operation will be item(s)
in the listbox2, one at a time.

Upon clicking a command button, how do i:

- create a loop that:
- work with the items from the listbox2 one at a time, so i can use
that value to complete an in loop operation step (the ensuing
operation mentioned above).
- once that step is complete, it loops back to the next item in the
listbox2, and continues until all items in the listbox have been gone
through.

Basically, I can't figure out how to work with the items in the
lisbox.
Any help would be much appreciated.

Thanks,
Steve