hi all,
when trying to execute a code for reading from a text file in VB, using the ReadAllText function, i get 'variable not defined' error.
the following is the code:
Private Sub Command2_Click()
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\test.txt")
MsgBox (fileReader)
End Sub
kindly enlighten me on why i get the error and what should be done to clear it.