Use Get and Open the File for Binary Access, then you can Skip right to the end of the File, eg..
------------------Code:Private Sub Command1_Click() Dim iFile As Integer Dim sBuff As String Dim iPos As Integer iFile = FreeFile sBuff = Space(255) Open "C:\File.txt" For Binary Access Read As iFile Get #iFile, LOF(iFile) - 255, sBuff Close iFile sBuff = Trim(sBuff) While InStr(iPos + 1, sBuff, " ") iPos = InStr(iPos + 1, sBuff, " ") Wend 'Display Last Word In the Caption Caption = Mid$(sBuff, iPos) End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]




Reply With Quote