FreeFile (function)

<< Click to Display Table of Contents >>

FreeFile (function)

FreeFile [()]

Returns the index of the next free file pointer. The result is an integer value between 1 and 255.

File indices are required when opening files (see the Open statement).

See also: Open

Example:

Sub Main

 A = FreeFile

 Open "TESTFILE" For Output As #A

 Write #A, "Test"

 Close #A

 Kill "TESTFILE"

End Sub