I'm using shapes.addline method in a sub to draw a line, passing in 2 ranges rFrom and rThru, and then using .top and .left on the ranges to supply the four points for the line. Seems pretty straightforward, but the line sometimes comes out at an angle when I've passed in ranges on the same row. In the immediate window I found out why. When I refer to the variable rThru it contains an incorrect top, though the address is correct:
? rFrom.address & " " & rThru.address
$AU$128 $BJ$128
? rFrom.top & " " & rThru.top
1259.25 1235.25
? range("BJ128").Top
1259.25
I can work around it in this instance because I need a flat line, so I can change the sub to use rFrom for both points, but if anybody knows what could cause this, please let me know.
? rFrom.address & " " & rThru.address
$AU$128 $BJ$128
? rFrom.top & " " & rThru.top
1259.25 1235.25
? range("BJ128").Top
1259.25
I can work around it in this instance because I need a flat line, so I can change the sub to use rFrom for both points, but if anybody knows what could cause this, please let me know.