Thread: A real puzzle?
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
paulsuk paulsuk is offline
external usenet poster
 
Posts: 7
Default A real puzzle?

Bernie - you are a real star. Thanks for all the info. I will take it home
and study it carefully instead of watching the game tonight!

Thanks again
--
paul


"Bernie Deitrick" wrote:

Paul,

Select the pdf file, and look at the name box just above cell A1. It will show the object name.
Use that object name in place of "Object 1" in the code. Change the "Sheet1" to the name of the
sheet. Then place the code into a regular codemodule:

Sub PaulMacro()
With Sheets("Sheet1").Shapes("Object 1")
.Left = Range("C5").Left
.Top = Range("C5").Top
End With
End Sub

In the codemodule of the ThisWorkbook object, place this code:

Private Sub Workbook_Open()
PaulMacro
End Sub

Visit here for an introduction to macros:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

And here for an introduction to event code (the workbook open macro):
http://www.mvps.org/dmcritchie/excel/event.htm

HTH,
Bernie
MS Excel MVP


"paulsuk" wrote in message
...
Bernie

Thanks for that. I am sure it would work. Except we are way above my
knowledge level and I wouldn't know where to start!
--
paul


"Bernie Deitrick" wrote:

Paul,

Something like this, where Object 1 is the container of the pdf file: This will line the object
up
with cell C5 of sheet 1 - you could fire this macro from the workbook open event:

Sub Macro1()
With Sheets("Sheet1").Shapes("Object 1")
.Left = Range("C5").Left
.Top = Range("C5").Top
End With
End Sub

HTH,
Bernie
MS Excel MVP


"paulsuk" wrote in message
...
I am looking for a way to embed a pdf in a worksheet at a specific point so
that the user can click on an icon and read the document but cannot
reposition the icon to another place in the worksheet. Every time the user
opens the worksheet I want him/her to find the icon where I put it and not
where he/she dragged it to last time. I suppose I am looking to associate
the icon/object with a
specified cell and allow the user to open it but not to move it to another
cell.
--
paul
--
paul