View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vic Eldridge[_3_] Vic Eldridge[_3_] is offline
external usenet poster
 
Posts: 112
Default placing an embedded file on a sheet in a fixed position

Hi Jeff,

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


Regards,
Vic Eldridge


" wrote:

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