Combo Box - Can I Concatenate the list?

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!
 
M

merjet

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
 
K

Kathryn

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Combo or list box 0
Concatenating Cells 2
Concatenate when pasting. 0
combo box 2
Combine two spreadsheets into one 3
Looking for a Date forming function 3
Combo boxes in excel 6
Combo Box 1

Top