If I have a combo box (created by control toolbar), is there a way to set it so that when the pull down is selected, it displays the top entry in the list instead of the the most recently selected item.
Option Explicit
Private Sub ComboBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.ComboBox1.ListIndex = -1
End Sub
Go into Design mode and double click on that combobox. Then paste this code
in. (Adjust the procedure name to match your combobox name--or better, use the
dropdown at the top of the code window to choose your combobox and then choose
the _mousedown event.)
(You will have to change this line:
Me.ComboBox1.ListIndex = -1
to match the name.)
Option Explici
Private Sub ComboBox1_MouseDown(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single
Me.ComboBox1.ListIndex = -
End Su
Go into Design mode and double click on that combobox. Then paste this cod
in. (Adjust the procedure name to match your combobox name--or better, use th
dropdown at the top of the code window to choose your combobox and then choos
the _mousedown event.
(You will have to change this line
Me.ComboBox1.ListIndex = -
to match the name.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.