I have a 'do..while' section of code where it loops through lines in a text file, counts them, and when the line = "" the loop is supposed to stop and report the number of lines it counted. This all works fine in debugging mode... but when I compile it and try to run it from a program it doesn't stop when the line = "" it keeps going... it doesn't even stop at EOF.
Oddly enough... when I popped some msgbox's in there to see why it wasn't stopping when the line = "" it worked perfectly!
Anyone have ANY idea what could be going on? Here is the code, you'll notice the test msgbox I had put in:
Open filename For Input As #1
Do Until EOF(1) 'until end of file
Input #1, strLineValue 'read each line of text file, assign value
If strLineValue = "Optimal Parameter Set" Then
Input #1, strLineValue
Input #1, strLineValue
'figure out how many ARCAEM parameters there are
Do While strLineValue <> ""
arrCellValue = Split(strLineValue)
If arrCellValue(0) <> "ARCAEM_BG_K" Then
param = param + 1
Else
BGK = True
End If
Input #1, strLineValue
MsgBox strLineValue & ": " & param
Loop
End If
Loop
Close #1