Solved

Column Heads in Forms 2.0 ListBox control

Posted on 1998-02-18
3
885 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…

735 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