I need to write an array that can store an input value from a use a key and another variable as a value
So a real simple example of what I want to achieve is:
Sub addValuesToArray()
Dim aRandomVar as String
aRandomVar = "test"
Dim myArray() as String
userInput = inputBox("How do you want to call this variable")
myArray(userInput) = aRandomVariable
End sub
However, running this gives me a type 9 error. Any thoughts on what I should improve?
aRandomVariableis never declared! Secondly, you can't use an array for key/value pairs. Check outcollection...