Shabat Closer

Wednesday, February 6, 2013

VB6 : read file into string variable

use this function to open text file into variable

Function ReadFile(filename As String) As String
  Open filename For Input As #1
     ReadFile = Input(LOF(1), 1)
    Close #1
End Function


usage:
dim data as string
data=ReadFile("filedata.txt");

No comments:

Post a Comment