Combo Box - Can I Concatenate the list?

  • Thread starter Thread starter Kathryn
  • Start date Start date
K

Kathryn

Does anyone know how to concatenate two listrow cells into
one in a combo box?

For example, I want to have "Smith, John" show up in the
combo box from two cloumns, A1 = Smith and B1 = John

Any suggestions would be greatly appreciated!

Thanks!
 
For example, I want to have "Smith, John" show up in the
combo box from two cloumns, A1 = Smith and B1 = John

Private Sub UserForm_Activate()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
For iRow = 1 To 2
ComboBox1.AddItem ws.Cells(iRow, 1) & ", " & ws.Cells(iRow, 2)
Next iRow
End Sub

HTH,
Merjet
 
Thank you, Merjet ~

I will give it a shot.

K
-----Original Message-----

Private Sub UserForm_Activate()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
For iRow = 1 To 2
ComboBox1.AddItem ws.Cells(iRow, 1) & ", " & ws.Cells(iRow, 2)
Next iRow
End Sub

HTH,
Merjet


.
 
Back
Top