Function FileToStringv1(filePath As String) As String Dim fileNum As Integer Dim fileContent As String Dim vFileContent As Variant ' Open the file in binary mode fileNum% = Freefile() Open filePath For Input As fileNum% ' Use LOF to find the file length, and Input$ to read the entire file into the string veriable izFile. fileContent$ = Input$(Lof(fileNum%), fileNum%) Close fileNum fileNum% = Freefile() Open filePath For Input As fileNum% vFileContent = Input(Lof(fileNum%), fileNum%) Close fileNum len1 = Len(fileContent$) len2 = Len (vFileContent) FileToStringv1 = vFileContent End Function