Harriers007
New Member
- Joined
- Oct 31, 2017
- Messages
- 6
Hi All, I have the following code that allows a user to make a single selection, via a user form, based on a lookup range. This works fine. The problem I have is that I need to make this a 'multiple selection'.
My Code is;
Can anyone help, anything really appreciated
My Code is;
Code:
Sub Demo2()
Dim Ops() As Variant
Dim Cnt As Integer, i As Integer
Dim UserChoice As Variant
Cnt = Range("animals").Count
ReDim Ops(1 To Cnt)
For i = 1 To Cnt
Ops(i) = Range("animals").Range("A1").Offset(i - 1, 0)
Next i
UserChoice = GetOption(Ops, 1, "What's your favorite animal?")
If UserChoice = False Then
Range("A7") = ""
Else
Range("A7") = Ops(UserChoice)
End If
End Sub
Can anyone help, anything really appreciated