View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex[_33_] Alex[_33_] is offline
external usenet poster
 
Posts: 5
Default concatenting rows for excel combo box output

Thank you Tom, the code you sent worked great. I really appreciate the
help! :)




Tom Ogilvy wrote:
Use code like the below to fill the combobox. Then the result will be the
selected item in the combobox.

set rng = Range(Range("A2"),Range("A2").End(xldown))
for each cell in rng
me.combobox1.AddItem = cell.Value & _
" " & cell.offset(0,1).Value
Next




"Alex" wrote:

Step 1 of what I wish to accomplish:

I have two rows, col A and Col B.

ColA is for First Name and Col B is for Last Name.

I want to present a combo box that displays the contents of these rows
as if the data were from one single row

Step 2 of what I wish to accomplish:

Once the user makes the selection in the combo box I want the output to
essentially concatentate the Col A and Col B for the selected row so
that if for example they choose from the combo list:

Joe Smith

The resulting entry into the destination field would be Joe Smith. Not
merely Joe.