test an external file for size

R

Roy

hi
i have got this macros that transfer csv text into tables.
but if the csv files are empty, a error message will come up saing "query
must have at least one destination field". that's because the csv file is
empty.
is any to test if the file is empty, if yes, don't to the macro, else do the
macro.

thank u
 
D

Douglas J. Steele

VBA has the FileLen function that will return the size of the file in bytes.
 
Top