I have a userform which has some comboboxes. On initialize, the comboboxes' drop down lists are populated with a literal 2d array. Later in the initialize code I pull information from various sheets into the userform (info from previous contacts). The reason for the 2d array is that a few fields have code numbers so I figured when the combobox is loaded with information I'm pulling from the records, say 01, 02, it would display the text (2nd column of combo), i.e. 01 = Wages, 02 = unemployment. However, it will display the actual value of what is being pulled in. Is it possible to have the combo show the text when the data matches the bound column or does filling it via vba override that and just puts in the value of the field I'm pulling from.
When I use this: Me.Controls("CoBoxIncType" & ii) = Trim(.Cells(i, "Q").Value) I get the exact value of what is in cell "Q" row (i)
I tried this: Me.Controls("CoBoxIncType" & ii).column(0) = Trim(.Cells(i, "Q").Value). it doesn't work
Should I just use a 1d array and instead call a function (case select) that will return the string I want to put into the combobox?
Thanks,
Poz
When I use this: Me.Controls("CoBoxIncType" & ii) = Trim(.Cells(i, "Q").Value) I get the exact value of what is in cell "Q" row (i)
I tried this: Me.Controls("CoBoxIncType" & ii).column(0) = Trim(.Cells(i, "Q").Value). it doesn't work
Should I just use a 1d array and instead call a function (case select) that will return the string I want to put into the combobox?
Thanks,
Poz