How to select item using combo-box in ms-excel?

polashd

Distinguished
Jun 5, 2011
1
0
18,510
0
I'm trying to populate a combobox (in excel using vba) which ad items from a range.
It's doing that.
But when I click an item from the dropdown list, it's not showing any item as it's text. (it's text is blank)
If i ad a code to display a msgbox (with anything) in the click event, it's showing the selected item in the combobox!!
The code I used are below:
---
Private Sub ComboBox1_DropButtonClick()
ComboBox1.Clear

For i = 1 To 5
ComboBox1.AddItem Worksheets("Sheet1").Range("a" & i)
Next
End Sub

Private Sub ComboBox1_Click()
'MsgBox “anything”
End Sub
----

The msgbox is not required and I can find no reason of this behavior.
can any one pls help me..

 
Thread starter Similar threads Forum Replies Date
B Apps General Discussion 3
H Apps General Discussion 2
electro_neanderthal Apps General Discussion 0
W Apps General Discussion 4
H Apps General Discussion 2
S Apps General Discussion 6
M Apps General Discussion 5
J Apps General Discussion 4
W Apps General Discussion 8
C Apps General Discussion 1
G Apps General Discussion 2
F Apps General Discussion 1
L Apps General Discussion 1
S Apps General Discussion 9
viveknayyar007 Apps General Discussion 0
P Apps General Discussion 4
M Apps General Discussion 2
oddlyinsane Apps General Discussion 1
dstarfire Apps General Discussion 3
R Apps General Discussion 2

ASK THE COMMUNITY