Sorry for the C# code if you like vb.
private static string GetLastLine( string filename )
{
System.IO.StreamReader reader = null;
try
{
new StreamReader( filename );
reader.BaseStream.Position = reader.BaseStream.Length - 1;
while ( ( char ) reader.BaseStream.ReadByte() != '\n' )
reader.BaseStream.Position -= 2;
return reader.ReadLine();
}
finally
{
reader.Close();
}
}