[AccessD] Checking if a file is open

Carlos Alberto Alves caa at highway.com.br
Wed Feb 11 02:44:34 CST 2004


On Mon, 9 Feb 2004 15:28:26 +0000, <rsmethurst at UK.EY.COM> wrote:

> Thanks for the reply Oleg.
>
> That is what I have at the moment, but if at all possible I would like to
> work around the file being open, (like I said though - if at all 
> possible)
>
> Cheers
> Ryan
>
>
> <Oleg_123 at xuppa.com>
> Sent by: accessd-bounces at databaseadvisors.com
> 09/02/2004 15:26
> Please respond to Access Developers discussion and problem solving
>
>
>         To:     <accessd at databaseadvisors.com>
>         cc:
>         Subject:        Re: [AccessD] Checking if a file is open
>
>
> the easiest  (aaltough not the best) way would be to see what is the
> number of the error you are getting, and write code for that error
> prompting the user to close excel appl, and exiting the sub
>
>> Hi All,
>>
>> I am importing data from Excel into Access.  The initial step in this
>> process involves copying the data from the excel spreadsheet into a
>> temporary copy of itself.  This step fails if the file is open.  Does
>> anyone recommend a method that I could use to see if the file is already
>>  open (and then notify the user to shut it down?)
>>
>> TIA
>> RyanS
>>

Take a llok at FileAttr function. It might help you.
;-)

-- 
**************************************
* Carlos Alberto Alves               *
* Child Neurologist                  *
* Systems Analyst/Programmer         *
* Rio de Janeiro, Brazil             *
* mailto:caa at highway.com.br          *
**************************************


More information about the AccessD mailing list