Combo Box filter with autocomplete

  • Thread starter Thread starter renaissanceme
  • Start date Start date
R

renaissanceme

hi all,

I have a timesheet entry form that requires employee # to operate.
Since employee # is something that is assigned, and not reliably
referenced on timecards, the operator will use the name to find the
EENUM. To do that, I created a combo box that is called on the
"BeforeDoubleClick" command. The data that populates it is 6 columns
of info, starting with EENUM, Name, Status... and 3 more columns to
help the operator identify the correct one to select.

I have set the textcolumn so that it references the 2nd column - the
names, and the target cell will be populated with the EENUM when the
operator closes the combo box. It all works smashingly. But, I want
to tune things up a little more.

We have 1000+ employees, so the list that is called up is quite large.
I would like the drop down button to be automatic & while the employee
is typing a name in, for the list to be filtering on every keystroke.
I would also like the combobox to close when the operator hits enter,
and not force them to use the mouse and click elsewhere on the screen.
Am I just dreaming, or is this indeed possible?

Thanks in advance for all you help,

Dave
 
Hi Tom,

Thanks for your help.

I have the autocomplete working - that's not the issue. I've also got
the dropdown menu opening automatically, by using:

Private Sub TempCombo_Change()
TempCombo.DropDown
End Sub

How do I allow the user to simply hit enter to select and exit the
combo box?

Dave
 
Hi Tom,

Thanks for your help.

I have the autocomplete working - that's not the issue. I've also got
the dropdown menu opening automatically, by using:

Private Sub TempCombo_Change()
TempCombo.DropDown
End Sub

How do I allow the user to simply hit enter to select and exit the
combo box?

Dave
 
Hi Tom,

It's not the retracting only that I want. I want it to close
completely. Is there an 'on enter' event that I can work with?

Thanks,

Dave
 
Hi Tom,

I figured out how to get out of the combo box without the mouse - enter
to select line from the drop down and to close the drop down, esc to
return the focus to the spreadsheet, and enter to trigger

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

to close and hide the combo box.

thanks again for you help.

Dave
 
Back
Top