Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if "FileCopy" function fails
Hi
Test if file2 exists, alternatively also if its filesize is identical to file1. HTH. Best wishes Harald "Robert Crandal" wrote in message ... 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
method "range" of object "_worksheet" fails | Excel Programming | |||
Can I create an "IF" function using cell color as a logical test? | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
FileCopy Command Giving "Subscript Out of Range" Error Message | Excel Programming | |||
Looking for VB code to test for "RING" , "BUSY" disconnects or other signals | Excel Programming |