Combo - Col 2 Value

saltkev

Active Member
Joined
Oct 21, 2010
Messages
324
Office Version
  1. 2013
Platform
  1. Windows
Hi

Can anyone help I have a combobox with 2 columns, bound to column 1. Lets call it Combobox_1, However I need to keep the value of the selected bound column in Combobox_1, and pass the value of Column 2 to a textbox, lets call it textbox_1. This would would be undertaken on an "Exit" Event from Combobox_1.

Many Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
On a sheet or userform? (never mind - no exit event on a sheet!)

Something like:
Code:
With me.combobox_1
  me.textbox_1.value = .list(.listindex, 1)
End With
 
Upvote 0
See my edited post - I realised after posting it couldn't be a sheet.
 
Upvote 0
Hi

Seems to work but maybe I did not explain correctly. In my Combo ther is a list of 1, 2, 3 bound in col 1. in col 2 of the same list there is a coresponding value of hello, goodby, seeyou. The Solution you gave seems to always pass the value hello. What I really need is to be able to select 2 in my combo and the value goodby be passed to my textbox


1 Hello
2 goodby
3 seeyou

Many thanks
 
Upvote 0
There must be something else interfering then because it works as it should for me. Do you have any other code that would be resetting the list or the selected item before the combobox is exited?
 
Upvote 0
Hi

yes your right, I developed a new form with just these 2 objects and everthing works. I will have to track things down.

Thanks

For the help

regards

Kev
 
Upvote 0

Forum statistics

Threads
1,224,605
Messages
6,179,860
Members
452,948
Latest member
UsmanAli786

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