You can use a Listbox to do that by setting 2 properties.
No need to create the userform on the fly.
Userform with Listbox.
Data in A2:B6
Private Sub UserForm_Initialize()
Dim rngData As Range
Dim lngIndex As Long
Set rngData = Range("A2:B6")
With ListBox1
.ColumnCount = 1
.MultiSelect = fmMultiSelectMulti
.ListStyle = fmListStyleOption
For lngIndex = 1 To rngData.Rows.Count
.AddItem rngData.Cells(lngIndex, 1).Value
.Selected(lngIndex - 1) = (rngData.Cells(lngIndex, 2).Value = "Y")
Next
End With
End Sub
Bookmarks