ComboBox DropDown when Key is pressed

S

shrekut

I am using the OnKey event to trap for the F6 key being pressed. The
ComboBox1.DropDown method is called in a macro when the user presses
the F6 key. Also on the same sheet as the combobox I have code in the
Worksheet's SelectionChange event that repositions the same combobox in
the ActiveCell. So the combobox follows the activecell.
The problem I am having is that when the user presses F6 and then
clicks on another cell the list stays open in the previous cell. Esc
does nothing for this.
Any suggestions?

Thanks...
 
S

steve smallman

Try using the combo box's lostfocus event to assist in
ensuring it is tidied up. I haven't thought about what
you might do, but this event should trap your problem for
you.

Steve
 
S

shrekut

Thanks Steve.
I was able to solve my problem by using ComboBox1.Activate before I
used ComboBox1.DropDown. That one has been bugging me long enough.
 

Ask a Question

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.

Ask a Question

Top