Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default R/T error 53 - File Not Found

Any apparent errors from the below Macro?

Sub LoadMyPdf()

Dim Filt As String
Dim Title As String
Dim Filename As Variant

'Set up list of File Filters
Filt = "PDF Files (*.pdf),*.pdf,"
Title = "Select a pdf file to open"
Filename = Application.GetOpenFilename _
(Filefilter:=Filt, Title:=Title)
Shell "C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe" &
Filename, 1
'Shell Filename
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default R/T error 53 - File Not Found

If you know that you're pointing to the correct location for the reader, then
try adding a space character after the .exe

....der\AcroRd32.exe " & ...



JMay wrote:

Any apparent errors from the below Macro?

Sub LoadMyPdf()

Dim Filt As String
Dim Title As String
Dim Filename As Variant

'Set up list of File Filters
Filt = "PDF Files (*.pdf),*.pdf,"
Title = "Select a pdf file to open"
Filename = Application.GetOpenFilename _
(Filefilter:=Filt, Title:=Title)
Shell "C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe" &
Filename, 1
'Shell Filename
End Sub


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default R/T error 53 - File Not Found

ps.

After trying to get the filename from the user, you may want:

if filename = false then
exit sub
end if

Just in case they clicked the cancel button.

JMay wrote:

Any apparent errors from the below Macro?

Sub LoadMyPdf()

Dim Filt As String
Dim Title As String
Dim Filename As Variant

'Set up list of File Filters
Filt = "PDF Files (*.pdf),*.pdf,"
Title = "Select a pdf file to open"
Filename = Application.GetOpenFilename _
(Filefilter:=Filt, Title:=Title)
Shell "C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe" &
Filename, 1
'Shell Filename
End Sub


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default R/T error 53 - File Not Found

Thanks Dave;
I added space after .exe to read ....exe " & filename, 1

and also inserted the

if filename = false then
exit sub
end if

Still getting R/T 53

I'm running XL2003 SP3 - Vista Home Premium (64-bit)

"Dave Peterson" wrote:

ps.

After trying to get the filename from the user, you may want:

if filename = false then
exit sub
end if

Just in case they clicked the cancel button.

JMay wrote:

Any apparent errors from the below Macro?

Sub LoadMyPdf()

Dim Filt As String
Dim Title As String
Dim Filename As Variant

'Set up list of File Filters
Filt = "PDF Files (*.pdf),*.pdf,"
Title = "Select a pdf file to open"
Filename = Application.GetOpenFilename _
(Filefilter:=Filt, Title:=Title)
Shell "C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe" &
Filename, 1
'Shell Filename
End Sub


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default R/T error 53 - File Not Found

try wrapping the filename with double quotes:

"...\Reader\AcroRd32.exe " & chr(34) & filename & chr(34), 1

As an experiment, you may want to copy the .pdf file to your C:\ folder.

Rename this copy so that there are no spaces in the file (C:\a.pdf) and test
that.




JMay wrote:

Thanks Dave;
I added space after .exe to read ....exe " & filename, 1

and also inserted the

if filename = false then
exit sub
end if

Still getting R/T 53

I'm running XL2003 SP3 - Vista Home Premium (64-bit)

"Dave Peterson" wrote:

ps.

After trying to get the filename from the user, you may want:

if filename = false then
exit sub
end if

Just in case they clicked the cancel button.

JMay wrote:

Any apparent errors from the below Macro?

Sub LoadMyPdf()

Dim Filt As String
Dim Title As String
Dim Filename As Variant

'Set up list of File Filters
Filt = "PDF Files (*.pdf),*.pdf,"
Title = "Select a pdf file to open"
Filename = Application.GetOpenFilename _
(Filefilter:=Filt, Title:=Title)
Shell "C:\Program Files (x86)\Adobe\Reader 8.0\Reader\AcroRd32.exe" &
Filename, 1
'Shell Filename
End Sub


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Error: File Not Found I h8 sku112.cab New Users to Excel 2 September 25th 08 10:58 PM
Installation Error: File not Found jwill_03 Excel Discussion (Misc queries) 0 November 6th 07 09:59 PM
Installation error, file not found Home Girl Excel Discussion (Misc queries) 1 June 30th 07 12:54 PM
Error 1311. Source file not found Devdas Excel Worksheet Functions 0 May 16th 07 04:25 PM
Runtime Error '53' File Not Found? et10yl Excel Discussion (Misc queries) 0 November 27th 06 10:49 PM


All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"