I've created several Textboxes in which the user can input detail. I've created a button that I want to act as a "save" button. I've tried the following code but I get a wiggly blue line under the objwriter from line 3-8.
What it says is that "'objwriter' is not declared. It may be inaccessible due to its protection level"
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click Dim objwriter As System.IO.StreamWriter(C:\Desktop) objwriter.Write(txtFirstName.Text) objwriter.Write(txtSurname.Text) objwriter.Write(txtAccountNumber.Text) objwriter.Write(txtAccountType.Text) objwriter.Write(txtInvestment.Text) objwriter.Close() End Sub
Any advice on how to fix this?