Coded in the READ button
Try
If IO .File.Exists("Numbers.txt") Then
Dim MyNumbers (4) As String
Dim inFile As IO.StreamReader
inFile=IO.File.OpenText("Numbers.txt")
Dim intCount As Integer = 0
While InFile.Peek<>-1
MyNumbers(intcount)=inFile.ReadLine
inCount +=1
End While
inFile.Close()
Else
MsgBox("File does not exist")
End If
Catch AnyTypeOfException As Exception
MsgBox("Sorry,something went wrong!")
End Try
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment