Solved

VB6 multiple column list box

Posted on 2016-08-27
3
28 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 250 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 47

Accepted Solution

by:
Martin Liss earned 250 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro: print each sheet to pdf using ExportAsFixedFormat 11 71
Copy a row 12 76
Add and format columns in vb6 7 85
TT Auto Dashboard 13 104
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 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