M
Merkling, Steven
What is logFileName equal to?
Is #1 still open from a previous operation?
-Merk
I have the following problem. In the code below, opening the file
triggers an error. If I comment out the on Error, the file appears to
open just fine and is read from appropriately. The line in question
is "Open logFileName For Input As #1" . I left in all the code but it
is irrelavant (I think) since the code always dies on the open
statement. What am I doing wrong?
Thank you for your help. Please kindly email me at my email address if
possible.
-Elie
On Error GoTo SNAFU
Open logFileName For Input As #1
For i = 0 To numPerms
Line Input #1, textLine
If (x) Then
values = Split(textLine, Chr(9))
On Error GoTo SNAFU
With STARTCELL
For xx = 0 To mapSize - 1
.Offset(i - 1, map(xx).Text).Value = values(xx + 1)
Next xx
End With
Else
x = True
End If
Next i
Close #1
Exit Sub
SNAFU:
MsgBox "There was one or more problems with the file ", _
vbCritical, "Data Read Error (-201)"
Is #1 still open from a previous operation?
-Merk
I have the following problem. In the code below, opening the file
triggers an error. If I comment out the on Error, the file appears to
open just fine and is read from appropriately. The line in question
is "Open logFileName For Input As #1" . I left in all the code but it
is irrelavant (I think) since the code always dies on the open
statement. What am I doing wrong?
Thank you for your help. Please kindly email me at my email address if
possible.
-Elie
On Error GoTo SNAFU
Open logFileName For Input As #1
For i = 0 To numPerms
Line Input #1, textLine
If (x) Then
values = Split(textLine, Chr(9))
On Error GoTo SNAFU
With STARTCELL
For xx = 0 To mapSize - 1
.Offset(i - 1, map(xx).Text).Value = values(xx + 1)
Next xx
End With
Else
x = True
End If
Next i
Close #1
Exit Sub
SNAFU:
MsgBox "There was one or more problems with the file ", _
vbCritical, "Data Read Error (-201)"