thanks for the help borislav
Slán
~M
>>hi all,
>>i am importing from an excel sheet but in my error checking with try...catch i get an error if the file is open. no problem, but all that i get back is the number, 1426, but if i don't have the error checking i get a more detailed error message saying that a "share violation has occured". i would rather get this error message text than just the number so that i can show the used what has happened. looking up the error number doesn't give me anything better, does anyone know how i can get the error message from the code or from the original error?
>>Slán
>>~M
>
>What do is to trying to open XLS fille before importing:
>
>
>@define UnBufferedReadWrite 12
>
>
>nfHandle = FOPEN("FullPathToYourXLSFile.XLS", UnBufferedReadWrite)
>
>IF nfHandle < 0
> MessageBox("The file is open from another application")
> RETURN
>ENDIF
>FCLOSE(nfHandle)
>
>**Your code here
>
Go raibh maith agat
~M