Test if "FileCopy" function fails
I am using the following line to copy a file:
FileCopy file1, file2
How can I test if the above function call fails
or not?? I tried using the following code below,
but I received a compiler error:
Set fc = FileCopy file1, file2
if fc is Nothing then
' it failed
else
' it worked
end if
Thank you!
|