Solved

combo box

Posted on 2002-06-19
2
182 Views
Last Modified: 2010-05-02
hi,

i have a number of questions here about combo box control.

1) how to select the 1st item in the combo box as default?
2) when user has selected one of the items, how do i get the value of the item?


thanks.
0
Comment
Question by:icecool
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 100 total points
Comment Utility
1) Combo1.ListIndex = 0
2)
Private Sub Combo1_Click()
    MsgBox Combo1.List(Combo1.ListIndex)
End Sub
0
 
LVL 8

Expert Comment

by:DennisBorg
Comment Utility
  >1) how to select the 1st item in the combo box as default?

To select the first item in the combo box:

      Combo1.ListIndex = 0




   >2) when user has selected one of the items,
       how do i get the value of the item?

You would use the TEXT property of the combo box. For example:

   MsgBox Combo1.Text


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now