Combo Box Dropdown

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
2,072
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
In the combo Change event I goto my code to do stuff... and the combo box dropdown
does not retract.
Is there an instruction to make it do that ?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If by Retract you mean Go back to Top which is empty.

You need to use a Click Event not a change Event:

Use something like this:

Code:
Private Sub ComboBox2_Click()
'Modified  3/24/2019  12:50:44 AM  EDT
Sheets(1).Cells(1, 1).Value = ComboBox2.Value
ComboBox2.ListIndex = -1
End Sub
 
Upvote 0
Thanks, I tried that and it didn't make much difference, the dropdown list stayed visible.
However setfocus to another control removes the dropdown and is good enough, even if a kludge.
The Click event was a good idea as I was using a Boolean in the change event and can remove it now.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top