Problem with Importing Excel File

  • Thread starter Thread starter lynn
  • Start date Start date
L

lynn

I have button in my form to import an excel file to my
Database.When I click the button, an inputbox is poping up
with a message , "Please Enter the path of the file". If I
enter the path correctly the program works fine. If I
don't enter the path correctly, nothing happened in my
form.I have to give this program to my customers in order
to update the database. If they don't enter the path
correctly, how can I give warning to them ? Is there any
code for that?. Any help. It is really appreciated.
 
You can use the Dir function to determine whether or not a file exists. If
strFile contains the complete path to the file, then Len(Dir(strFile)) will
be 0 if the file doesn't exist.

However, why not grab the code in http://www.mvps.org/access/api/api0001.htm
and let them pick from the standard Windows File Open dialog, rather than
having to type it?
 
Back
Top