[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB 5.0 Forms 2.0 Object Library  Combo box.

Posted on 1998-04-02
1
Medium Priority
?
449 Views
Last Modified: 2008-02-01
 I would like to know how to fill the second column of the combo box contol in the Microsoft Forms 2.0 Object Library.
 I can display the 2 columns, and I can display the headers for each column, but I cannot fill the second column with any information.  Some sample code would be great.

   Also, how do you fill the headers?
0
Comment
Question by:jmccay
[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
1 Comment
 

Accepted Solution

by:
jcoppinger earned 800 total points
ID: 1460271
You must use the ColumnHeads property with the ListFillRange, Control Source, or Row Source properties to populate the headings.  These properties depend on data objects such as Excel worksheets.  You cannot populate the headings using properties or methods available in the Combobox itself.

Here is one way to populate multiple columns:

Private Sub Form_Load()
Dim data(9, 1) As String
Dim i

For i = 0 To 9
    data(i, 0) = CStr(i)
    data(i, 1) = "foo"
Next i
With ComboBox1
    .ColumnCount = 2
    .List() = CVar(data)
End With
End Sub

jc
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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 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…
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…
Suggested Courses

649 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