PDA

View Full Version : use combobox as history



gregl
07-22-2010, 01:38 AM
I am trying to use a combobox in a form to store a history of recent directory paths. I have no problem adding the paths, but I want to limit the history to the most recent 5 selections.
So bascially, when an entry in the combo box is selected - i want it to also be set a listindex=0. Sound easy?
Problem is the only event that fires on a pulldown entry selection is the _click event - (afterupdate event does not register) and at this point in time the previous selection is still considered the selected value - as such the following code does set the new selection to listindex = 0, but the previous.

Private Sub dir_input_click()
dir_input.ListIndex = 0
End Sub