It would be nice to state why auto-instantiation leads to the observed behaviour rather than my statement of avoid due to unexpected/unwanted consequences. If I run mine and OPs with VarPtr I observe the same behaviour with respect to memory addresses. I can't seem to get ObjPtr to work in VBA?
I know with auto it instantiates each time seen so is in relation to that and that in last loop all stored dictionaries are updated with the same values.
Function myRow(x As range) As Integer
myRow = x.Row
End Function
In your sheet you can use: =myRow(A2), which will return 2.
In VBA, if you have a Range, like i.e. myRange, you can do MsgBox(myRow(myRange))