Solved

Column Heads in Forms 2.0 ListBox control

Posted on 1998-02-18
3
892 Views
Last Modified: 2008-02-01
I'm doing some programming for Outlook using VBScript, and I need to use a control that can display data in a list with multiple columns.  I have been using the ListBox control (MS Forms 2.0).

To display column heads, I set the ColumnHeads property to true:

ListBox.ColumnHeads = True

This creates space for the column heads at the top of the list box.  However, I have been unable to figure out how to actually put a heading in the ColumnHead area.  Anyone have any suggestions?

I did look in Excel's Object Browser, and the Help file for ColumnHeads just says the following:

"When the system uses the first row of data items as column headings, they can't be selected." (Copyright(c) 1996 Microsoft Corporation.)

I'm not even sure what this means.  How can I "get" the system to use the first row of data items as column heads?  Everything I've tried has failed.

If you can't answer this question, I'd appreciate some comments with suggestions of good alternatives.  My requirement is 12 columns, and the ability to put headings on the columns.
0
Comment
Question by:dmacioce
[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
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 50 total points
ID: 1457469
do you have VB 5 on the machine?  If so, consider using DBGRID.  However, since I suspect you don't, consider this:

The list in a ComboBox consists of rows of data. Each row can have one or more columns, which can appear with or without headings. Some applications do not support column headings, others provide only limited support.

The same is true for the listbox.  

If you get any kind of activex grid, you should be able to use it.
0
 

Author Comment

by:dmacioce
ID: 1457470
Thanks.

Actually, MS FlexGrid control works fine (tried it out after I read your suggested), so I might use that.  
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1457471
MS Flexgrid is probably better actually!  thanks for the points
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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

724 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