954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Input past end of file?

]   Dim GETWORD
    Dim GETLINE
    Dim ARRAYNUMBER As Integer
    Dim itmx As ListItem


    nFileNum = FreeFile
    Open "C:\Documents and Settings\Reece\My Documents\I.T\Visual Basic\Reece\client.db" For Input As nFileNum
    If Input(LOF(nFileNum), nFileNum) > "0" Then
        GETLINE = Input(LOF(nFileNum), nFileNum)
        GETLINE = Split(GETLINE, "*")

    Do While GETLINE(ARRAYNUMBER)
        GETWORD = Split(GETLINE(ARRAYNUMBER), "|")
        Set itmx = lvwdbase.ListItems.Add(, , GETWORD(0))
        itmx.SubItems(1) = GETWORD(1)
        itmx.SubItems(2) = GETWORD(2)
        itmx.SubItems(3) = GETWORD(3)
        itmx.SubItems(4) = GETWORD(4)
        ARRAYNUMBER = ARRAYNUMBER + 1
    Loop
    Close nFileNum
    End If


Any Idea why itd be sayin input past end of file?

client.db has
Courtney Osborne|Reece Alexander|650|$82,722|Edit/View*
Diane Alexander|Raymond Alexander|340|$22,021|Edit/View*

ReeciePoo
Light Poster
45 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Anyone? Ima bout to slap myself over this?

ReeciePoo
Light Poster
45 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

The EndIf it the wrong side of the close statement.

purplegerbil
Junior Poster in Training
78 posts since Apr 2005
Reputation Points: 24
Solved Threads: 6
 
The EndIf it the wrong side of the close statement.



Fair enough. but even so when i hit debug when the error shows up it takes me to the LOF line

ReeciePoo
Light Poster
45 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

Are You Still Having Trouble With This Or Have You Sorted It ?

SkinHead
Light Poster
31 posts since May 2007
Reputation Points: 12
Solved Threads: 2
 

We have a problem in Magictool software; when we making a any programe then this software is genrating programe number but now it is not genrating that time showing Run time error '62' - Input Past End of File.
Plz gude

reeturaj
Newbie Poster
2 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You