Combobox entires

dave8

Active Member
Joined
Jul 8, 2007
Messages
275
I have a combobox with listfillrange of three columns of data (sheet2!A1:C20).

ColumnA ColumnB ColumnC
-------- -------- --------
Data1 Data2 Data3
...

I know if I do ComboBox1.Value --> this will get me Data1. How can I get the value in ColumnB, Data2?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try
Code:
Private Sub ComboBox1_Change()
With ComboBox1
MsgBox .List(.ListIndex, 1)
End With
End Sub
 
Upvote 0
Try
Code:
Private Sub ComboBox1_Change()
With ComboBox1
MsgBox .List(.ListIndex, 1)
End With
End Sub

Thank you. How much do you know about Listbox? I posted a entry about listbox but didn't get much help. I have an Active-x Listbox on a worksheet and values are loaded during run-time. The property of this listbox is set to multi with option (can check mutiple items). The problem I'm having is trying to access the last item using the scroll bar. The scroll bar down to the second to the last item of the list but I can't access the very last item. Do you understand why?
 
Upvote 0
Not sure why that should be , Is it possible to add a couple of blank rows at the end of the code.
Mick
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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