File not found

rainey

Board Regular
Joined
Feb 26, 2004
Messages
54
In Cell B3 I have the following cell reference:

"E:\14Hoover\EndZone0002.avi"

When I run the following code:

Private Sub Copy_Avis()
FileCopy ["B3"], "C:\14Hoover\EndZone0002.avi"
End Sub

I get following message box:

Run-time error '53'
File Not Found

I have doubled checked and the file exists.

As a matter of fact to make sure the file exists when I run:

Private Sub Copy_Avis()
FileCopy "E:\14Hoover\EndZone0002.avi", "C:\14Hoover\EndZone0002.avi"
End Sub

It works like a charm.

I have been working on this for weeks with no resolution. Any help would be appreciated.
Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Wrong reference to cell B3!! (["B3"]="B3", not "E:\14Hoover\EndZone0002.avi"

Try:

Private Sub Copy_Avis()
FileCopy [B3], "C:\14Hoover\EndZone0002.avi"
End Sub
 
Upvote 0
Now I have the message box:

Run-time error '52'
Bad file name or number



thanks for the help
 
Upvote 0
It is the same. One thing that is interesting is that when I highlight the contents of cell B3 by double clicking and copy then paste it works perfectly. When I just click on the cell, copy and paste there is an extra space at the end of the contents.
"E:\14Hoover\EndZone0002.avi" (a space follows the .avi" that doesn't exist if I highlight, copy and paste)
Does this matter and more important if it does, how do I fix it?

Thanks again
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top