Combo box question

kibaruzo

New Member
Joined
Oct 21, 2006
Messages
3
I am using a combo box embedded on a worksheet. If I click on it to show the values, is it possible to click somewhere outside of the combo box to close it? Right now, when I open the combo box and click on a neighboring cell, the drop down box stays open. Or if I change sheets without selecting a value, the drop down portion is visible in all other sheets until I return the the first sheet and select a value to close the combo box.

I know on user forms you can click on the form to automatically close the combo box (like most webpages). Is this something I have to get used to with embedded combo boxs?

Thank you.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,150
Hi kibaruzo, welcome to the forum.
I am not sure I got the problem, but you have to close the form via the X button at the top right or by creating a button and associating it the "close form code, something like this:
Private Sub CommandButton1_Click()
UserForm_Name.Hide
End Sub

Do you need further instruction on how doing this?

Bye,
 

kibaruzo

New Member
Joined
Oct 21, 2006
Messages
3
Thanks for the reply! Actually, I'm not using a form, rather, a combo box right on a worksheet. So, for instance, when a user goes to select an item from the combo box but then decides to do something else (select a different cell or change sheets), the drop down box is still open. I'm not able to upload a print screen of what I'm talking about, but for example, when posting a reply on this board, there are "Font Settings" combo boxes. If you click the down arrow the box shows all the options, but then if you immediately click on a different area of the webpage, the combo box will automatically close. The combo box on my sheet doesn't close unless you select a value.

I know some properties are not available to the embedded controls compared to the same controls that are used on forms. Maybe that's the issue??
 

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,150
I understand, you are using the combobox available within the Modules toolbar.
You say that the dropdown box (list) remains open if, for example, you don't complete the selection and select another cell or sheet.
In my tests this doesn't happen: if I click the combobox the list is shown, and if I click outside it, the list closes without changing the selected item, even though the new cell or sheet is not activated until I click again on it.
Are you having a different result?
I am using Excel 2002.

Bye,
 

kibaruzo

New Member
Joined
Oct 21, 2006
Messages
3
Problem Solved

Anthony47, It was my fault all along :oops: ....there was an old click event still in one of my modules that wouldn't really do anything, but every time it fired it was enough to cause that problem I posted about. Anyway, problem solved....thanks for pointing out that it should work!!!
 

Forum statistics

Threads
1,136,991
Messages
5,679,004
Members
419,797
Latest member
ikethegenius

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
Top