ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   View a non-Excel file whose name is in a cell (https://www.excelbanter.com/excel-programming/405525-view-non-excel-file-whose-name-cell.html)

Dgfrank99

View a non-Excel file whose name is in a cell
 
I'm fairly new to VBA, and have been through the existing threads. Good
info, but:

I'm still trying to determine how I can get a non-Excel filename (PDF,
actually) to display in a separate window using the default reader for that
filetype where the active cell contains the filename. I have the full
pathname in the active cell.

Thanks for any help you can throw my way.

Bob Phillips

View a non-Excel file whose name is in a cell
 
rtn = Shell("""C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"" """
& Range("A1").Value & """", 1)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Dgfrank99" wrote in message
...
I'm fairly new to VBA, and have been through the existing threads. Good
info, but:

I'm still trying to determine how I can get a non-Excel filename (PDF,
actually) to display in a separate window using the default reader for
that
filetype where the active cell contains the filename. I have the full
pathname in the active cell.

Thanks for any help you can throw my way.




Dgfrank99

View a non-Excel file whose name is in a cell
 
Bob,

Thanks so much. I've tweaked it for my later Reader version, and the Adobe
reader window pops up just fine, but now the reader can't see the file no
matter what location or file extension. I'm continuing to hammer at it. For
your information, here's where I am so far:

rtn = Shell("""C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"" """ &
Range("A1").Value & """", 1)

Thanks for all your help!

"Bob Phillips" wrote:

rtn = Shell("""C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"" """
& Range("A1").Value & """", 1)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Dgfrank99" wrote in message
...
I'm fairly new to VBA, and have been through the existing threads. Good
info, but:

I'm still trying to determine how I can get a non-Excel filename (PDF,
actually) to display in a separate window using the default reader for
that
filetype where the active cell contains the filename. I have the full
pathname in the active cell.

Thanks for any help you can throw my way.






All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com