N/APosted on - 02/01/2013
I am trying to open a text file of Visual Basic. But it doesn't open. I am finding error there. Have you any easy solution that it can easily open just by a click. Please help me with solving.
Want to open the Visual Basic by Notepad. But can’t..
There are few issues in visual basics when working with text files.
What kind of error are you getting? If you are getting this message.
Then the file you are trying to open doesn’t exist. To check it use the following code:-
Dim FILE_NAME As String = "C:UsersOwnerDocumentstest.txt"
If System.IO.File.Exists(FILE_NAME) = True Then
Dim objReader As New System.IO.StreamReader(FILE_NAME)
TextBox1.Text = objReader.ReadToEnd
MsgBox("File Does Not Exist")
If there is some other error and you are using visual basic 2005 you can try to fix it using Microsoft Support website.