Getting both values ​​from 2 columns of ComboBox VBA

I have a custom form (excel, VBA) where there are 2 combobox columns. When the user selects a specific value from the combo box, I want to get the selected value and the value associated with the first value (that is, the value of the second column).

How should I do it? It just ComboBox1.Value

returns the value of the first column. ComboBox1.Value(0)

does not work.

+3


source to share


1 answer


Use the column property on the combo box. It is 0-based, so the first column is column (0) and the second column is column (1).



Me.ComboBox1.Column(1)

      

+9


source







All Articles