Returns the size, in bytes, of a file opened using the Open statement.
LOF(filenumber)
The filenumber argument is any valid file number.
To obtain the length of a file that is not open, use the FileLen function.
EOF Function, FileLen Function, Loc Function, Open Statement.
This example uses the LOF function to determine the size of an open file. This example assumes that TESTFILE is a text file containing sample data.
Open "TESTFILE" For Input As #1 ' Open file.= LOF(1) ' Get length of file.#1 ' Close file.