Syntax 

LOF([#]StreamNum)


Group 

File 


Description 

Return StreamNum file length. The length depends on how the file was opened:


  • Input, Output or Append mode: number of characters
  • Binary or Random mode: number of bytes


Parameters

Description

StreamNum 

Streams 1 through 255 are private to each macro. Streams 256 through 511 are shared by all macros.


Example

Sub Main

    Open "XXX" For Input As #1

    L = LOF(1)

    Close #1

    Debug.Print L

End Sub