Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple one 2

Status
Not open for further replies.

shannanl

IS-IT--Management
Apr 24, 2003
1,071
US
I guess that beer I drank last night killed the brain cell that held this information because I cant seem to recall how to do this.

I need to read each item in a list box into an array and I cant remember how to get the items. I thought it was something like strExample(x) = list1.listindex(x) but that does not work.

Thanks for the info.

Shannan
 
Try:
MsgBox List1.List(List1.ListIndex)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Or if it's always the currently selected item that you want:

MsgBox List1.text

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
For I = 0 to List1.ListCount - 1
Array1(I) = List1.List(I)
next

Here is the code you need to asign all items in the listbox to an array.

 
That did it, thanks for jump starting my brain this morning.

Shannan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top