Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,958 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am having issue with this code below. I am attempting to copy and paste a shape to certain position. When I adjust the .top and .left property of the copied shape the height and width get altered slightly from the original. Why is the shapes height and width changing by setting a new top and left property?
Sub move_selection()
'assume shape is already selected
Dim vSel, vSel_copy, temp_height, temp_width As Variant
Set vSel = Selection
temp_height = vSel.Height
temp_width = vSel.Width
vSel.Copy
Range("A49:L94").Select
ActiveSheet.Paste
Set vSel_copy = Selection
With vSel_copy
.Placement = xlFreeFloating
.left = vSel.left + 50
.top = vSel.top
End With
End Sub