ActiveX ComboBox Issues

LDale

New Member
Joined
Apr 2, 2011
Messages
26
I have a ActiveX ComboBox and the box is showing one of the items the list of items. When i try select from the box it flash another box and does nothing.
In design mode i can see and select items in the ComboBox object which then changes the ComboBox. Why can't I just select from the omboBox itself?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Perhaps some of your code is conflicting
- do you have more than one event macro associated with the combobox?

What do you want to do with the selected value from the combobox? (how do you want to use it?)

Here is a simple way to start which is guaranteed to work
- build from there changing one thing at a time, making sure it works before moving on.

To test the code
- click on the combobox
- select an item from the list
- click on any cell in the worksheet
- combobox value returned to message box

Before doing that
1. Add a NEW sheet
2. Place values into range A1:A5 (which is used to populate the combobox)
3. Insert active-x combobox in the sheet(check that it is Combobox1)
4. Place the code below in the SHEET module
5. Make sure that "Design Mode" is not active

Code:
Private Sub ComboBox1_GotFocus()
    ComboBox1.List = Me.Range("A1:A5").Value
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    MsgBox ComboBox1.Value, , "Value is:"
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,181
Members
452,615
Latest member
bogeys2birdies

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