I currently have code running that deletes down a table and imports in new data by entering the file name into a text box. However, if I accidently write the incorrect file name the query goes into debug mode because it cannot find the file.
Is there any way the code can search for the file first and if it cannot find the file it returns a message "Cannot locate file" and does not try and run the rest of the code?
Any help would be greatly appreciated.
Kind regards,
forest