Option Explicit On Option Strict On Public Class Form1 private function PullInfo(byval fileContents as String, byRef line as String, byref startPos as Integer ... ) as Boolean Dim position As Integer position = fileContents.IndexOf(ControlChars.NewLine, startPos) End Function Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' declare variables Dim allText As String Dim current As String Dim lineExists As Boolean If My.Computer.FileSystem.FileExists("DVDs.txt") Then allText = My.Computer.FileSystem.ReadAllText("DVDs.txt") Do lineExists = PullInfo(allText,current, ... Loop Until Not lineExists Else MsgBox("Please ensure that DVDs.txt file is in the debug folder under the project") End If End Sub Private Sub btnPay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPay.Click End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click txtTitle.Clear() txtPrice.Clear() txtTax.Clear() txtTotal.Clear() End Sub Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click Me.Close() End Sub End Class