Show one range in a combobox and write the 2nd range!

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I have two lists one that show a product or narrative and the other one
shows the code(the acronym for the narrative). I also have created a
combobox, which is linked to the narrative list, what I what to do is to see
the narrative on the combobox but when I click on the specific narrative the
macro will write the code.
A B
Pears Pr
Supercalifr.. Sp
Beer Drnk
so if I select Beer the macro would write Drnk. I'm assuming this is
posible? Ihavent figure it out or have any idea how to do this!
Many Thanks to all the people that have been helping me lately in this
personal project of mine. And I have been looking in the forum and the web
for tutorials and ideas.

Thanks

Kevin Brenner
 
One way is to store both column values in the list and make the ColumnWidth
for one of them equal to 0.

So if your RowSource is A1:B3 like in your example, add ;0 to the
ColumnWidths property and 2 to ColumnCount.

Then to retrieve a selected value
With ComboBox1
MsgBox .List(.ListIndex, 1)
End With
 
Back
Top