Populate an Excel VBA UserForm ComboBox with Full Names
Question details
Populate a VBA UserForm ComboBox with full names assembled from separate worksheet columns.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet stores first and last names separately, and the user wants to display combined names in a UserForm without adding a formula column.
- Observed behavior
- The ComboBox should display each first and last name together when the UserForm opens.
Confirm the worksheet name, the ComboBox name, and the columns and starting row containing the names. The example uses Sheet1, ComboBox1, first names in column E, last names in column F, and data starting in row 2.
Add full names when the Excel UserForm initializes
Use the UserForm Initialize event to combine names in memory and add them to the ComboBox without changing the worksheet.
In Excel, press Alt+F11 to open the VBA editor, then find and open your UserForm in the Project Explorer.
Select the ComboBox, press F4 to open Properties, and make sure RowSource is blank. This allows the code to populate the list.
Open the UserForm's code window and add the following event procedure. Replace Sheet1 and ComboBox1 if your names differ: Private Sub UserForm_Initialize() Dim sh As Worksheet Dim lastRow As Long Dim r As Long Set sh = ThisWorkbook.Worksheets("Sheet1") Me.ComboBox1.Clear lastRow = sh.Cells(sh.Rows.Count, "E").End(xlUp).Row For r = 2 To lastRow If sh.Cells(r, "E").Value <> "" Then Me.ComboBox1.AddItem Trim(sh.Cells(r, "E").Value & " " & sh.Cells(r, "F").Value) End If Next r End Sub
Save the workbook as an Excel Macro-Enabled Workbook (.xlsm). In the VBA editor, select the UserForm and press F5 to run it, then open the ComboBox to check the names.

Work with name lists in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for common Excel formats, making it easy to move everyday name lists between applications. It does not fix Excel VBA UserForm issues; macro and UserForm compatibility may vary.

Frequently Asked Questions
Why must the ComboBox RowSource be blank?
RowSource binds the ComboBox to a worksheet range. Clear it in the ComboBox Properties window before using Clear and AddItem to populate the list in code.
How do I use different columns for the names?
In the UserForm_Initialize procedure, change the column letters in sh.Cells(r, "E") and sh.Cells(r, "F"). Also change the column used to calculate lastRow if the first-name column has moved.
How can I populate a large list faster?
In UserForm_Initialize, read the two name columns into a VBA array, combine the names in memory, and assign the resulting array to the ComboBox List property. Keep RowSource blank.
Why does the list not populate when I reopen the workbook?
Check that the workbook is saved as an .xlsm file, that macros are enabled for the workbook, and that the code is in the UserForm's Initialize event rather than a standard module.




