tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,832
- Office Version
- 365
- 2019
- Platform
- Windows
If I have the value 1,2,3,4,5 in cells A1 to E1 and I write:
I can inspect the elements in the Locals window easily.
If instead of assigning an array to the data, I use a range, as follows:
when I look at the Locals window, there is a lot more info .Where can I see the range's elements?
I have also notice typing:
and
returns the same value of 2.
Why is that?
Thanks
Code:
Dim DataArray() As Variant
DataArray() = Range("A1:E1").CurrentRegion.Value
I can inspect the elements in the Locals window easily.
If instead of assigning an array to the data, I use a range, as follows:
Code:
Dim Rng As Range
Set Rng = Range("A1:E1")
when I look at the Locals window, there is a lot more info .Where can I see the range's elements?
I have also notice typing:
Code:
? Rng(2).Value
and
Code:
? Rng(1,2).Value
returns the same value of 2.
Why is that?
Thanks