trying to pick apart a line input string but get this error
if i use position it works, but when i '-1' from it i get the error. ive dimmed as ints and singles, still the same.
any ideas??
scoreFile = FreeFile
Open App.Path & "\scores.dat" For Input As #scoreFile
count = 0
Do Until EOF(scoreFile)
Dim position As Long
Dim space As Long
Line Input #scoreFile, golfdata
position = InStr(golfdata, ","
space = InStr(golfdata, ""
error msg-- Lname(count) = Left$(golfdata, position - 1)
Fname(count) = Right$(golfdata, space + 5)
count = count + 1
Loop
if i use position it works, but when i '-1' from it i get the error. ive dimmed as ints and singles, still the same.
any ideas??
scoreFile = FreeFile
Open App.Path & "\scores.dat" For Input As #scoreFile
count = 0
Do Until EOF(scoreFile)
Dim position As Long
Dim space As Long
Line Input #scoreFile, golfdata
position = InStr(golfdata, ","

space = InStr(golfdata, ""

error msg-- Lname(count) = Left$(golfdata, position - 1)
Fname(count) = Right$(golfdata, space + 5)
count = count + 1
Loop