I would like to know it is possible to set text in static array in the parenthesis like the following code.
Sub test()
Dim myarray(1 to 10 , Costs to Revenues )
myarray(1,Costs) = ...
...
End sub
AFAIK the only way to use an initializer for an array in VBA is with the Array function. Note that it has to be declared as Variant:
Sub ArrayDemo()
Dim strings As Variant
strings = Array("one", "two", "three")
Dim counter As Integer
For counter = LBound(strings) To UBound(strings)
Debug.Print strings(counter)
Next counter
End Sub
CostsandRevenuesrepresent here? - Tim WilliamsEnumthere defining values forCostsandRevenues? - John Alexiou