Re: PAth/File Access Error
You are operating sequentially. If you want to write from the beginning just close it and open it again. If you want to use direct access, you need the word RANDOM, and you must write all records the same length, and specify the Len parameter when opening the file. The least amount of work required on your part woud be just to close the file momentarily.
Re: PAth/File Access Error
I just ran your code on several different files and it worked every time (including excel.exe). Are you trying to do this across a network?
I would say with 99% certainty that you don't have the appropriate file access permissions to do what you're trying to do. That is basically what the error message is trying to tell you.
Re: PAth/File Access Error
hmmm...
i have full permission... (Its XP home)
and its not over a network.....
I try again tonight....
Re: PAth/File Access Error
OK. Here's a simple test to establish whether it's a permissions thing. Try and delete excel.exe (make a copy first).