Excel shape resizes when moved

Patrick 0 Reputation points
2024-06-10T16:47:21.37+00:00

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
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,609 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,649 questions
{count} votes