In your Open statement, you specified a type of access that was invalid for the specified file type. This error has the following causes and solutions:
You can omit the access mode specification when opening a file for input, but if you specify it, the access mode must be Read. Both Write and Read Write are invalid access modes on a file opened for Input.
You can omit the access mode specification when opening a file for append, but if you specify it, the access mode must be Write. Both Read and Read Write are invalid access modes on a file opened for Append.
You can omit the access mode specification when opening a file for output, but if you specify it, the access mode must be Write. Both Read and Read Write are invalid access modes on a file opened for Output.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).