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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List boxes

Status
Not open for further replies.

brainfailure

Programmer
Joined
Jul 17, 2007
Messages
4
Location
US
in Visual basic you can access certain items in a list box by using this function

str = list.List(0)

but this dosen't seem to work in vba, is there function that would do this.

Thanks
 
Have a look at the Column property of the ListBox object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
i have aleady tried that i can't find anything. the reason i need this function i want to get all the values in a list box and put it into one string. now the i tried to do this was using this function.

Dim str As String
For i = 0 To modidLis.ListCount
str = str + modidCom.list(1) + " "
Next i

is there another method for doing this without using the modidCom.list function.
 
An access ListBox has no List method/property ...
So, you want to get all the values of which column of which kind of listbox ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
just a normal single column list box. all i have changed on the ls box is set it to value list. the output looks something like this.

WJ5964IV
WJ5964IV
WJ5964IV
WJ5964IV
WJ5964IV
WJ5964IV
WJ5964IV

and i want it to look like this

WJ5964IV WJ5964IV WJ5964IV WJ5964IV WJ5964IV WJ5964IV
 
set it to value list
A starting point:
MsgBox modidCom.RowSource

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
cheers worked out a diferent way of doing it. thats for the help though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top