Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"input past end of life"

Status
Not open for further replies.

jfair

IS-IT--Management
Aug 28, 2003
2
HU
I just started to learn vb. When I run this program I get "Run Time Error - Input past end of life" What does that mean & How can I fix it?

Dim intTotal As Integer, intItem As Integer
Dim strItem As String
Open "C:\Program Files\Microsoft Visual Studio\vb
lessons\Tut06\lc5.dat" For Input As #1
Do While Not EOF(1)
Input #1, strItem, intItem
strItem = Left(strItem, 3)
Select Case strItem
Case "ABC"
intTotal = intTotal + Val(intItem)
lblTotal.Caption = "The Total Number of
Parts ABC11 sold is"
lblGtotal = intTotal
Case "BDX"
intTotal = intTotal + Val(intItem)
lblTotal.Caption = "The Total Number of
Parts BDX22 sold is"
lblGtotal = intTotal
Case "CVA"
intTotal = intTotal + Val(intItem)
lblTotal.Caption = "The Total Number of
Part CVA33 sold is"
lblGtotal = intTotal
End Select

Loop
Close #1
End Sub
 
More 'trouble'. The var intItem is never set to a value.

The error is 'Input past end of "FILE", not 'Input past end of "LIFE".
MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top