Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Copy Error
I have copied this file from office excel help and ran it with error message
as follows. Run time error: '53' File Not Found My deault folder address is My Documents and SRCFILE is under this directory. Thank you for your advices . Sub FileCopyTest() Dim SourceFile, DestinationFile SourceFile = "SRCFILE" ' Define source file name. DestinationFile = "DESTFILE" ' Define target file name. FileCopy SourceFile, DestinationFile ' Copy source to target End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Copy Error
Try adding the file extensions:
Sub Cpy() Dim SourceFile As String Dim DestinationFile As String SourceFile = "SRCFILE.xls" ' Define source file name. DestinationFile = "DESTFILE.xls" ' Define target file name. FileCopy SourceFile, DestinationFile ' Copy source to target. End Sub Hope this helps Rowan Jay wrote: I have copied this file from office excel help and ran it with error message as follows. Run time error: '53' File Not Found My deault folder address is My Documents and SRCFILE is under this directory. Thank you for your advices . Sub FileCopyTest() Dim SourceFile, DestinationFile SourceFile = "SRCFILE" ' Define source file name. DestinationFile = "DESTFILE" ' Define target file name. FileCopy SourceFile, DestinationFile ' Copy source to target End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - error saving file & error loading dll | Excel Discussion (Misc queries) | |||
Error opening edited XML file - Where is the error log? | Excel Discussion (Misc queries) | |||
EXCEL FILE a copy/a copy/a copy ....filename | New Users to Excel | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming | |||
"Path/File Access Error" on Sheets.Copy | Excel Programming |