Hi,
I would like to create a drop down list on the fly using only VBA. I know how to create a single column drop down using the following:
Rather than storing a list on the worksheet named "MyRange", I am wondering if it is possible to store the values in an array and then use the contents of the array in something like the code above:
I am stumped, so any direction you could give me is most appreciated.
thanks,
Ben
I would like to create a drop down list on the fly using only VBA. I know how to create a single column drop down using the following:
Code:
Public Sub CreateList()
With ActiveCell
.Validation.Delete
.Validation.Add xlValidateList, , , "=" & "MyRange"
End With
End Sub
Rather than storing a list on the worksheet named "MyRange", I am wondering if it is possible to store the values in an array and then use the contents of the array in something like the code above:
Code:
Dim MyArray as String
MyArray = Array("Value1", "Value2", "Value3", "Value4")
I am stumped, so any direction you could give me is most appreciated.
thanks,
Ben