View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Open files from a dynamic path..

Arjan,
Depends where the PDFs are relative to the Excel WB. You already have
ThisWorkbook.Path, so if they in a sub folder of that :
ThisWorkbook.Path & "\PDF_Folder\PDF1.pdf"

If you maybe on Mac then you would need to do bit work at detecting that
first.

NickHK

"Arjan" wrote in message
...
Hi al..

I have a problem.. I placed the question here last week aswell,

unfortunatly
it did not solve my problem..

Scope:
I have a userform where I would like to add some buttons wich open certain
adobe PDF files. Furthermore, this project is to be burned on a CD so it

can
be distributed.
My problem are the drive letters.. (diffrent systems, diffrent drive
letters..)

this is the code i'm using..
_______________

Private Sub CommandButton19_Click()
'open pdf file
Dim filelocation As String
filelocation = ThisWorkbook.Path
_________________

I'm missing the last part where I call the variable filelocation and open
the pdf file..
Who can help me out?


--
Arjan Bregman

*****
the knowledge is always there, maybe hidden, but it is there..
*****