I have two problems first Im trying to load a new form that tells the user that the file is not yet saved and asks them if they'd like to save the file.
How do I return to the last event if they say no?
Second when I use this in the main form the txtTextBox.SaveFile is underlined with an error about it not being part of the windows.forms.textbox namespace.Code:Private Sub btnYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYes.Click 'Yes Save the file Save() Me.Close() End Sub Private Sub btnNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNo.Click 'No Dont save the file End Sub
Any Ideas?Code:Public Sub Save() If strFilename = "" Then SaveFileDialog1.ShowDialog() strFilename = SaveFileDialog1.FileName End If 'txtTextBox.SaveFile is underlined below: txtTextBox.SaveFile(strFilename & ".txt")




Reply With Quote