Dim myString As String
Dim input As String
Dim iCount As Integer
Dim theFile As System.IO.FileInfo
Dim re As System.IO.StreamReader
'Open the file to a stream
theFile = New System.IO.FileInfo("C:\yourtextfile.txt")
re = theFile.OpenText()
'Read in the first line
input = re.ReadLine()
'Loop through each line
Do While input <> ""
iCount = iCount + 1
'This will let the first four lines go, then
'it will add the rest of the file to myString.
If iCount > 4 Then
'You can put a return character inbetween these two if you
'want to have a new line for each line added.
myString = myString & input
End If
'Read in the next line for the loop.
input = re.ReadLine()
Loop
'Show your new string.
MessageBox.Show(myString.ToString())





Return to Visual Basic Programming
Users browsing this forum: No registered users and 0 guests