Go Premium for a chance to win a PS4. Enter to Win
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim lines() As String
lines = My.Computer.FileSystem.ReadAllText("c:\someFile.txt").Split(vbCrLf.ToCharArray, StringSplitOptions.RemoveEmptyEntries)
If lines.Length >= 2 Then
Debug.Print("3rd to Last: " & lines(lines.Length - 3))
Debug.Print("2nd to Last: " & lines(lines.Length - 2))
Debug.Print(" Last: " & lines(lines.Length - 1))
Open in new window
Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.