Hi,
I have a standard If statement in one of my subs. I want the application to open a file when one of these conditions of meet. What is this command e.g:
OPEN file$ [FOR mode] [ACCESS access] [lock] AS [#]filenumber% [LEN=reclen%]
file$ The name of the file or device. The file name may include a drive and path.
mode One of the following file modes: APPEND,
BINARY, INPUT, OUTPUT, or RANDOM.
access In network environments, specifies whether
the file is opened for READ, WRITE, or READ
WRITE access.
lock Specifies the file locking in network
environments:
SHARED, LOCK READ, LOCK WRITE, LOCK READ
WRITE.
filenumber A number in the range 1 through 255 that
identifies the file while it is open.
reclen For random-access files, the record length
(default is 128 bytes). For sequential
files, the number of characters buffered
(default is 512 bytes).
Example:
n$ = "C:\README.TXT"
OPEN n$ FOR OUTPUT AS #1
PRINT #1, "This is saved to the file."
CLOSE #1
OPEN n$ FOR INPUT AS #1
INPUT #1, a$
MsgBox "Read from file: " & a$
CLOSE #1
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.