ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Inserting pictures/autoshapes to certain cells ? (https://www.excelbanter.com/excel-programming/329694-inserting-pictures-autoshapes-certain-cells.html)

Dus

Inserting pictures/autoshapes to certain cells ?
 
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




JE McGimpsey

Inserting pictures/autoshapes to certain cells ?
 
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



In article ,
"Dus" wrote:

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.



All times are GMT +1. The time now is 03:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com