How can I determine the size of a file?
Printable View
How can I determine the size of a file?
Hi, Janitor.
Dim MySize
MySize = FileLen("TESTFILE") ' Returns file length (bytes).
Larisa
Hi Janitor.
Here's how to do it:
All the best.Code:dim stFileSize as string
stFileSize = FileLen("c:\windows\desktop\yourfile.txt")
Chris
Function FileLen(PathName As String) As Long Member of VBA.FileSystem
Returns the length of a file in bytes