Working on a security system that reads a text file. I have the inpute set up, but when it ges to read the file, the split command gives me the error either " Input past end of file" or "Subscript Unreachable". the format of thel ine I need to read is as follows:
Here's the command code:
Private Sub cmdOK_Click()
sUsername = txtUserName.Text ' used later in program, required line
Open sPWL For Input As 1 ' sPWL == App.Path + \Data1.dat
Line Input #1, sTemp ' used to skip Input marker past first line, which contains authorization code.
Do Until EOF(1)
Do While InStr(1, sTemp, vbCrLf) = 0 ' Meant to end at each line
Input #1, sTemp
If txtName.Text = Split(sTemp, "<>")(0) And txtPass.Text = Split(sTemp, "<>")(1) Then
frmLogin.Visible = False
frmMain.Visisble = True
Any help with why it gives me these error messages would be greatly appreciated. Probably something simple, I still pretty new to this.