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
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

chiello

Well-known Member
Joined
Jan 18, 2005
Messages
848
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
 

rainey

Board Regular
Joined
Feb 26, 2004
Messages
54
Now I have the message box:

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



thanks for the help
 

chiello

Well-known Member
Joined
Jan 18, 2005
Messages
848
Is the content of B3 exactly "E:\14Hoover\EndZone0002.avi"??
 

rainey

Board Regular
Joined
Feb 26, 2004
Messages
54
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,803
Messages
5,598,131
Members
414,214
Latest member
marketingnumbersguy

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
Top