Reading contents of a text file [RESOLVED]
Hi,
How would you open a text file and read a certain line of it?
Eg. 1) Read the contents of Line 4 and if it is equal to something, then execute some code.
2) If its equal to something else, exeucte some other code.
3) If its not equal to either, produce an error message box saying invalid.
Any ideas? Thanks
Current I have:
VB Code:
Dim fileSettings As Short
fileSettings = FreeFile()
FileOpen(fileSettings, VB6.GetPath & "\SMSettings.ini", OpenMode.Input)
It works fine and I have put Error Handlers to it so the program wont crash it if doesnt exist.