Precisely reposition a graphic

  • Thread starter Thread starter quartz
  • Start date Start date
Q

quartz

Hello.

I have a graphical object on a sheet and it is selected.
I need to move this object so that the top left corner of
the object is EXACTLY on the top left corner of cell "B2".

My code so far:

Dim objShape As Shape
Set objShape = ActiveSheet.Shapes(strSnapShotName)

objShape.?????

Please fill in what I need to do...thanks much in advance.
 
This worked for me:

Option Explicit
Sub testme01()
Dim objShape As Shape
With ActiveSheet
Set objShape = .Shapes(1) 'changed for testing!
With .Range("b2")
objShape.Top = .Top
objShape.Left = .Left
End With
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top