why does this code work but generate an error

  • Thread starter rfuscjr via AccessMonster.com
  • Start date
R

rfuscjr via AccessMonster.com

Dim SourceFile, DestinationFile
SourceFile = "X:\MYPG\Reports\MISC\MYPG_FM_wDetails.xls"
DestinationFile = "S:\Finance_Team_Stuff\budg\Current_Year\Detail\
MYPG_FM_wDetails.xls"
FileCopy SourceFile, DestinationFile
MsgBox "Done!"

Notes:
I mapped the S share to a sharepoint site. The file actually does copy over
but I get an error on the FIleCopy statement. Which interupts my automation.
Here is the error:

Run Time Error ' 52'
Bad File name or number
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top