*Excel commands ... myHandle = fopen(cFile,12) do while myHandle < 0 myHandle = fopen(cFile,12) && Try to open temp xls read-write enddo =fclose(myHandle) && Excel released it Release X *ERASE (cFile) && If you want to do this !You could also declare X as public.