Forum Discussion
ActiveSheet.Shapes object location different on different computers
Using this code I am successfully positioning and rotating an object on my Excel sheet on multiple computers. However, on a laptop the objects are not in the correct location.
Set cl = Range(Cells(ActiveCell.Row, 4).Address)
x1 = cl.Left
y1 = cl.Top
Set ActiveShape = ActiveSheet.Shapes.AddTextEffect(msoTextEffect31, "0", "Arial", 8, msoFalse, msoFalse, x1 - 9, y1 - 14)
ActiveShape.TextFrame.Parent.Rotation = -90
ActiveShape.Name = "A0" & ActiveCell.Row
Here is a quick test I did.
With a column width of 11.29 and a row height of 15 ....
Sub test()
'
For i = 1 To 10 ' column
For j = 1 To 10 ' row
Cells(j, i).Select
Set cl = Range(Cells(ActiveCell.Row, ActiveCell.Column).Address)
ActiveCell.Value = cl.Left & " / " & cl.Top
Next j
Next i
End Sub
Just tested another laptop and the first cell is 0 / -12