![]() |
placing an embedded file on a sheet in a fixed position
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 |
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 |
placing an embedded file on a sheet in a fixed position
this is the trouble I cant find any info about them, is it just:
Selection.ShapeRange.Left 27.75 Selection.ShapeRange.Top 548.25 |
placing an embedded file on a sheet in a fixed position
Worked a treat
thx Vic wrote: Selection.ShapeRange.Left = 27.75 Selection.ShapeRange.Top = 548.25 wrote: this is the trouble I cant find any info about them, is it just: Selection.ShapeRange.Left 27.75 Selection.ShapeRange.Top 548.25 |
All times are GMT +1. The time now is 12:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com