I need to read data from text files and use the same in my application. Im using VB 6.0. What commands do I use? Some Sample code would be highly appreciated.
Here is the code for that
Function ReadFileToText(filePath)
Dim objFile, objText, text
Set objFile = CreateObject("Scripting.FileSystemObject")
Set objText = objFile.OpenTextFile(filePath)
text = objText.ReadAll
objText.Close
Set objText = Nothing
Set objFile = Nothing
ReadFileToText = text
End Function
More details you can check http://smartreferences.blogspot.in