test an external file for size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
VBA has the FileLen function that will return the size of the file in bytes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top