Inserting pictures/autoshapes to certain cells ?

  • Thread starter Thread starter Dus
  • Start date Start date
D

Dus

Hello,
I need to add some pictures or autoshapes to my spreadsheet.
When recording a macro it carries out the folowing:
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 97.5, 53.25, 286.5,
74.25).Select

I'd like to know what kind of unites are used. I need to place those
graphical objects
on certain cells .... so for exapmle I need to find out right numers to be
used to place any object/picture on cell C3.

It seems that selecting desired cell has nothing to do with inseting objects
since those coordinates (in strange units) are used.
Any idea?

Thak you
Dusan
 
Cells can contain formulae or values. Shapes and pictures exist in the
Drawing Layer "above" the cells.

You can position them using cell references:

Dim sh As Shape
With Range("C3")
Set sh = .Parent.Shapes.AddShape( _
Type:=msoShapeRectangle, _
Left:=.Left, _
Top:=.Top, _
Width:=.Width, _
Height:=.Height)
End With
sh.Placement = xlMoveAndSize
 

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