Open

Opens a file in the mode described by the parameter list.

Syntax

file.Open PathName, Mode, [Access], [Lock], [RecLength]

The parts of the Open statement syntax are described in the following table.

Part Description
PathName String expression that specifies a filename.
Mode Specifies the file mode. Input, Output, Random, Append, or Binary. (1, 2, 4, 8, 32)
Access Operation permitted on the open file. Read, Write, or ReadWrite [Default]. (1, 2, 3)
Lock Operations permitted on the open file by other processes. Shared, LockRead, LockWrite [Default], and LockReadWrite. (1, 2, 3, 5)
RecLength Number less than 32767 (bytes). For files opened for random access, this value is the record length. For sequential files, this value is the number of characters buffered.

Remarks

The RecLength parameter is ignored if mode is Binary.