Example - LOF Function

This example assumes TESTFILE.txt is on your D drive and that it has some text inside of it.

Sub Main()
   Dim FileLength
   Open "D:\TESTFILE.txt" For Input As #1
   FileLength = LOF(1)
   MsgBox FileLength
   Close #1
End Sub