FileLen function determines the byte length of a file. The required File argument must be valid string expression representing a valid file name. File may contain a DOS path structure including directory or folder names, and a drive letter.
The FileLen function returns the size of a file immediately before it was most recently opened. To obtain the length of a file that is already open, use the LOF function.
A string or expression that can represent a valid file name, and may include a DOS path structure including directory or folder names, and a drive letter.
Returns a Long value representing the length of the file measured in bytes.
EOF | Loc | LOF | Seek
Dim lonFileSize As Long
lonFileSize = FileLen("C:\TESTFILE.txt") ' returns length of file in bytes