Solved

Column Heads in Forms 2.0 ListBox control

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 49
Excel VBA combine two working workbooks 8 49
Using "ScreenUpdating" 6 55
fso.FolderExists("\\server\HiddenFolder$") 4 52
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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 …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now