This is a matter of personal curiosity.
In VBA, if I have an array of size 2:
Dim r(1) as Variant
And I want both values ββin the array to be -1. I can do it:
r(0)=-1
r(1)=-1
Or I could iterate through a loop and set them to -1.
So my question is, is it possible to somehow set all the values ββin the array to the same thing without repeating?
Or, I can do something like:
r = array(-1,-1)
This may be a really stupid question, but I cannot find the answer.
Alec source
share