Solved

Column Heads in Forms 2.0 ListBox control

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
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…

746 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

8 Experts available now in Live!

Get 1:1 Help Now