placing an embedded file on a sheet in a fixed position

  • Thread starter Thread starter jeffhughes
  • Start date Start date
J

jeffhughes

I hope someone can help. I have written the following code:

ActiveSheet.OLEObjects.Add(Filename:= _
"Z:\CC Documentation\Blank Documents\YELL MAPS\reading.pdf",
Link:=False, _
DisplayAsIcon:=True, IconFileName:= _

"C:\WINDOWS\Installer\{AC76BA86-1033-0000-7760-000000000002}\PDFFile.ico",
_
IconIndex:=0, IconLabel:= _
"Reading Directions").Select

which basically embeds a pdf file (a map) dependent on what location
has been selected in cell B13 (I have not included that bit of the
code). What I having trouble with is getting it in the same location
on the worksheet . I have used the following lines:

Selection.ShapeRange.incrementLeft 27.75
Selection.ShapeRange.incrementTop 548.25

but this seems to place it all over the sheet.

I would appreciate any help.

thanks
 
Hi Jeff,

Use the Top and Left properties instead of IncrementTop and IncrementLeft.


Regards,
Vic Eldridge
 
this is the trouble I cant find any info about them, is it just:

Selection.ShapeRange.Left 27.75
Selection.ShapeRange.Top 548.25
 

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