Thread: [Solved] ComboBox Variable AND list
View Single Post
 
Old 08-16-2020, 09:25 AM
Kindyr Kindyr is offline Windows 10 Office 2019
Novice
 
Join Date: Aug 2020
Posts: 12
Kindyr is on a distinguished road
Default ComboBox Variable AND list

I am making a form that I want to auto populate if the names have already been put in at some other point. I am using comboboxes to populate the prefixes of the names such as Mr.|Ms.|Dr. etc using a Split () array. How can I make my combobox set default as the variable and still keep the rest of the list available? For some reason, my code only wants me to have either the list or the variable, not both.

Private Sub UserForm_Initialize()
Dim myPrefixes() As String
myPrefixes = Split(" |Mr. |Ms. |Dr.", "|")
Prefix1.List = myPrefixes

End Sub
Reply With Quote