kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Code:
Sub GetOutPut()
Dim V1, V2, V3, V4, V5
Dim TheList
Dim output
V1 = "This One"
V2 = "The Boy"
V3 = "That One"
V4 = "Car Race"
V5 = "Cash Money"
TheList = Array(V1, V2, V3, V4, V5)
Output = Application.WorksheetFunction.RandBetween(LBound(TheList), UBound(TheList))
MsgBox TheList(output)
End Sub
My aim is to pull randomly from the list meanwhile its showing me the list index instead. How do I get the value instead. Say
"The Boy" instead of 1?
Last edited: