Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB6 multiple column list box

Posted on 2016-08-27
3
Medium Priority
?
37 Views
Last Modified: 2016-09-16
How to fill info into multiple columns of a list box at design time, in vb6?
0
Comment
Question by:Sia Azizi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Assisted Solution

by:Scobber
Scobber earned 1000 total points (awarded by participants)
ID: 41773489
its been a while for me an VB6
but it goes along the lines of
your listbox is called ListView1

you say
listview1.columnheaders.add "First"
listview1.columnheaders.add "Second"
listview1.columnheaders.add "Third"

dim x as new listviewitem
x.value = "Value One"
x.subitems(1) = "Value Two"
x.subitems(2) = "Value Three"
listview1.items.add(x)

Open in new window

0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 1000 total points (awarded by participants)
ID: 41773790
While you can have multiple columns in a listbox, you really don't want to since multicolumn listboxes are hard to work with. You should use a listview control instead. The Lisview control is a part of Microsoft Windows Common Controls-3 6.0. Here's a complete example of using a listview and adding sort arrows to the column headers.
Project1.zip
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question