The problem is NOT OpenFile in the above code, it's in FileRequest, you are not telling it that you want to open a file for writing, so it defaults to reading, so quite rightly, it says "File not Found"
Try this :
Code: Select all
file$ = FileRequest("Choose file to write", "",#REQ_SAVEMODE )
From the Documentation
NAME
FileRequest -- pop up a file requester
SYNOPSIS
f$ = FileRequest(title$, pattern$[, mode, defdir$, deffile$])
NAME
FileRequest -- pop up a file requester
SYNOPSIS
f$ = FileRequest(title$, pattern$[, mode, defdir$, deffile$])
.......
mode - optional: mode to use; either #REQ_NORMAL, #REQ_SAVEMODE or
#REQ_MULTISELECT (defaults to #REQ_NORMAL) (V2.0)
Hope that helps