Sub pointprotect
Dim reader As TextReader
reader.Initialize (File.openinput(File.DirInternal, main.strfilename))
Dim lineoftext As String
Dim cline()
lineoftext = reader.ReadLine ' get the first line
Do While lineoftext<> Null
cline = Regex.Split(",", lineoftext)
If cline(0) = main.strpointno Then
Msgbox("Point " & main.strpointno & " has been used. Please select another","msg")
Return True ' A match was found so return true
End If
lineoftext=reader.ReadLine
Loop
Return False ' No match, return false
End Sub