Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box and first record

Status
Not open for further replies.

KatGraham

Programmer
Feb 12, 2003
58
0
0
US
How do I get a combo box to display the first record automatically (not blank)?
 
Is the following bit of code what you are looking for. I think you need to use the ListIndex method.

Private Sub UserForm_Activate()
With ComboBox1
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.ListIndex = 0
End With
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top