ReadFile
Read an entire text file into a string in one call.
Inputs
sFileName As String
Returns
String containing file contents.
Rate ReadFile
(4(4 Vote))
Public Function ReadFile(ByVal sFileName As String) As String
Dim fhFile As Integer
fhFile = FreeFile
Open sFileName For Binary As #fhFile
ReadFile = Input$(LOF(fhFile), fhFile)
Close #fhFile
End Function
ReadFile Comments
No comments yet — be the first to post one!
Post a Comment