Reputation: 1
I need help making a Macro move a picture to cell in excel. I can move a picture up, down, left and right. But I want the macro to move a picture to a cell (for example to cell B7) no matter where it is in the excel sheet.
I have tried using
Selection.ShapeRange.IncrementLeft -474.7059055118
Selection.ShapeRange.IncrementTop -303.5293700787
End Sub
this moves the picture, just not to the right spot
Upvotes: 0
Views: 593
Reputation: 3037
Use the Left
and Top
properties of the shape and the cell.
Selection.ShapeRange.Left = [B7].Left
Selection.ShapeRange.Top = [B7].Top
Upvotes: 1