I've searched everywhere but haven't been able to figure out why a range variable is able to reference cells outside the assigned range.
For example, if I write the code below:
Dim Rate as Range
Set Rate = Range("A1:A5")
For Each Cell In Rate
Debug.Print Cell.Value
Next Cell
Range("H6").Value = Rate(6).Value
Range("H7").Value = Rate(7).Value
The above routine will only print out the 5 values in "A1:A5" -- BUT the last 2 statements cause the values in "A6" and "A7" to get stored in "H6" and "H7".
Since the variable "Rate" has only been assigned to "A1:A5", why is it able to reference other cells in column A (i.e., "A6" & "A7")?
Am I doing something wrong? Any insight would be greatly appreciated!