ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retrieving data from a ComboBox (https://www.excelbanter.com/excel-programming/353325-retrieving-data-combobox.html)

ImCary

Retrieving data from a ComboBox
 
How do I retrieve an item from a multicolumn combobox? I need the value from
the second column. However, I need the box to display the value in the 1st
column.

sebastienm

Retrieving data from a ComboBox
 
Hi,
Use the BoundColumn Property of the COmbobox (check the online help about
this property)
Also you can access any element with cbx1.List(row,column) and replacing row
by cbx1.ListIndex
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"ImCary" wrote:

How do I retrieve an item from a multicolumn combobox? I need the value from
the second column. However, I need the box to display the value in the 1st
column.


Crystal[_5_]

calculated control to get 2nd column of combobox
 
Hi Im,

create a textbox control
ControlSource -- = combobox_controlname.column(1)

column 1 is actually column 2 since column indexing starts
with 0

make sure the ColumnCount property of the combobox is set to
something besides 1

the ColumnWidths property controls how the columns display
..5";2"
-- first column is .5" and second column is 2"
seperate column widths with semi-colon

the ListWidth property should be the sum of the ColumnWidths

Have an awesome day

Warm Regards,
Crystal

ImCary wrote:
How do I retrieve an item from a multicolumn combobox? I need the value from
the second column. However, I need the box to display the value in the 1st
column.



All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com