The error is given for these following:
txtFirstName
txtSurname
txtAccountNumber
txtAccountType
txtInvestment
txtInterestAmount
Imports System.Windows.Forms.TextBox
Public Class ClickSave
Public Sub cmdSave_Click()
Dim FILE_NAME As String = "F:\Investors.txt"
Dim objWriter As New System.IO.StreamWriter(FILE_NAME)
objWriter.WriteLine(txtFirstName.Text)
objWriter.WriteLine(txtSurname.Text)
objWriter.WriteLine(txtAccountNumber.Text)
objWriter.WriteLine(txtAccountType.Text)
objWriter.WriteLine(txtInvestment.Text)
objWriter.WriteLine(txtInterestAmount.Text)
objWriter.Close()
MsgBox("The file has been saved")
End Sub
End Class
I tried changing from private sub to Public and adding Imports System.Windows.Forms.TextBox but that didn't fix my problem.
Any ideas on what I can do?
This post has been edited by supr4: 13 March 2012 - 11:52 AM

New Topic/Question
Reply



MultiQuote




|