>i have no tables, itry it with tables and without the same message,
>
>it is a small project ,
>i use it to convert excel sheet to .dbf and make operations and convert it again to excel,
>no need to keep it.
>
>thanks
>>>hi all,
>>>i try to delete via command button as below.it works at mydir(myform),but if i run it as .exe i got error message file is in use.
>>>
>>>CLOSE all
>>>ERASE *.dbf
>>>ERASE *.cdx
>>>ERASE *.fpt
>>>ERASE *.xls
>>>
>>>thanks
>>
>>That means that probably one of the tables is open, and you must close some table first.
Some file is probably open. You might try to erase the files one at a time, and see what file gives you problems.
You can use adir() to get a list of files in a directory.
On the other hand, Glenn's suggestion seems quite plausible, so you might try this first.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)