AboutRavindra Expertise visual basic application programming from design to access information, sql, engineering and commercial applications. access databases, excel.
Optional:
1)a large number of people want me to do work which takes some time and effort. Pl.note that i would like to be paid for such work.
2) if you want me to spend quality time and do special work, i expect to be paid a reasonable price for my time.
3) if you are pleased with my reply you could consider a donation of 1$.
4) you can visit my website http://ravindra.coolpage.biz (under constrn)
Experience
Past/Present clients project work for a Norway company, and a Canadian company completed. Freelance Project work and Teaching
teaching vb
Expert: Ravindra Date: 6/30/2008 Subject: Error:input past end of file
Question I have used this code and getting an error input past end of file(written near line. )What does it mean
Open "C:\\sangeeta\Furnace\DATA\ChargingSequence.txt" For Input As #1
Open "C:\\Sangeeta\Furnace\DATA\ChargingSequence.txt" For Input As #2
For myIndex = 0 To 12
Line Input #1, strLine
Line Input #2, strLine1
Next myIndex
With Me.MSHFlexGrid1
'***********
dataLine = 0
Do While Not EOF(1)
.TextMatrix(dataLine + 1, 0) = dataLine + 1
For myIndex = 0 To 11
Input #1, dataAngle
If (myIndex = 0) Then
Input #2,dataAngle1 'Error:input past end of file
.TextMatrix(dataLine + 1, 1) = Left(dataAngle1, 6)
Else
.TextMatrix(dataLine + 1, myIndex + 1) = dataAngle
End If
Next myIndex
dataLine = dataLine + 1
Loop
End With
'***************************
Close #1
Close #2
Answer it means the point of reference in text file has gone beyond the length of text file (instead of 11 try 10).
your way of asking questions is bad. i get lots of questions and i dont want to hunt for errors in code particularly when things are unclear.
here why have you opened the same file twice?
what is datangle,
how many lines of text are in the text file?
i am not a magician to know everything. to trace an error, i need to know CLEARLY the whole thing.
the above error is due to a fault in your code. since i dont see your text file, how can i comment on this?
dont just shoot off questions. you should ask questions so that i dont waste too much of my time understanding the same.
i dont mind helping as long it does not include unclear and partial explanations.
did you try changing 10 or 11 instead of 12. no clue to me. and when you say error written near line, which line?
there is no big deal here, but i cannot help unless i can see all aspects, how many lines in text file etc