Look at the attached.
There is a userform called Choose which has a function called .FromList
.FromList has arguments
ChooseFrom - an array of the items from which the user will choose. It will also accept a Range as an argument, putting the contents of the cells in the range as the list.
Prompt (optional) - the prompt to be shown
Title (optional) - the title shown in the dialog box
Default (optiona) - the default choise
MultiSelect (optional)- MultiSelect is False if not specified
Delimiter (optional) - the delimiter used to return a string if Multi-Select is True, default is comma.
Choose.FromList will return a string, either the single item selected or (if Multi-Select is True) a delimited string.
It would be used in code like
Dim uiValue As String
uiValue = Choose.FromList(Array("one", "two", "three"), Prompt:="Pick a Number")
If StrPtr(uiValue) = 0 Then
MsgBox "Cancel pressed"
MsgBox uiValue & " was selected."