Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default FileCopy Question

All the documentation I have read shows the following code.

FileCopy OriginalFile, CopiedFile

Why then is the following code return "Wrong number of arguments or invalid
property assignment" ?

Sub Test_Copy()

FileCopy "I:\out\BMSEP.pdf", "C:\FC_0706\BMSEP.pdf"

End Sub

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default FileCopy Question

Are you sure it is failing with the code you are showing. I got the code
below to work. I copied the code straight from the website just modifying the
file names. Try running thecode from files on your c: drive. then
changingg to the I: drive. therre may be diffferent permissions on the I:
drive or the C: subdirectory that is causing the error.

Try two directories that you have full permission to read and writte such as
mydocuments.


Sub Test_Copy()

FileCopy "c:\temp\1391.pdf", "c:\temp\newpdf.pdf"

End Sub


"Bythsx-Addagio" wrote:

All the documentation I have read shows the following code.

FileCopy OriginalFile, CopiedFile

Why then is the following code return "Wrong number of arguments or invalid
property assignment" ?

Sub Test_Copy()

FileCopy "I:\out\BMSEP.pdf", "C:\FC_0706\BMSEP.pdf"

End Sub

Thanks for your help.

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
filecopy Question rjvega Excel Discussion (Misc queries) 2 July 8th 08 09:12 PM
filecopy Marvin Excel Programming 1 July 17th 05 06:34 PM
FileCopy Andibevan[_2_] Excel Programming 2 May 18th 05 02:58 PM
FileCopy Andibevan[_2_] Excel Programming 6 May 12th 05 10:13 AM
FileCopy John Green[_2_] Excel Programming 1 August 5th 03 08:55 AM


All times are GMT +1. The time now is 06:40 AM.

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

About Us

"It's about Microsoft Excel"