| | |
How do I populate multiple column list box?
![]() |
•
•
Join Date: Jul 2006
Posts: 21
Reputation:
Solved Threads: 1
as i understod from your message is that you want your listbox list to be like this when the ser drop down the list :-
meat milk
google hotmail
..... ....
if its so. you have to concatenate the columns like this
ListBox1.AddItem "haha"& " " & " haha2"
try it i hope this is what you want.
meat milk
google hotmail
..... ....
if its so. you have to concatenate the columns like this
ListBox1.AddItem "haha"& " " & " haha2"
try it i hope this is what you want.
Last edited by lover99509; Aug 30th, 2006 at 11:41 am.
Setting The Listbox to have multiple columns will not work the way you expect it to. Having a Mult-Column listbox will only show both columns, when the length of the first column is full. To illustrate this, start a new project, and drop a listbox on it. Change it's columns to 3, and add this code to form_load:
As you can see (depending on how "tall" you made the listbox) the first column fills up first, then the second, and third.... so on. In order to do what you want, it will take a bit of crafty programming, using the API. Check this site for further details: http://www.thescarms.com/vbasic/listbox.asp
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
For I = 0 To 300 List1.AddItem I Next I
•
•
Join Date: Jun 2006
Posts: 29
Reputation:
Solved Threads: 0
oh. i tried the loop you posted. it really did populate in multiple columns. more than 3 actually since my box is rather short.
sigh. last time i did in VBA the data source based on query/table, getting it into multiple columns is straightforward. never knew in VB6, with data source being values, is an entirely different story.
anyway thanks for the suggestions
sigh. last time i did in VBA the data source based on query/table, getting it into multiple columns is straightforward. never knew in VB6, with data source being values, is an entirely different story.
anyway thanks for the suggestions
![]() |
Similar Threads
- Looking for List Box help, please! (VB.NET)
- getting data from a list box. (Visual Basic 4 / 5 / 6)
- Multiple Select List Handling (JSP)
- My list box (Java)
- "Error in linking List box with the VB6.0 database" (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Issues with check boxes
- Next Thread: Silent printing of pdf files to a named printer...
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






