Using VB 2010 Express, the problem is, after displaying a message box when data is inadvertently omitted, when "O.K" is clicked, I wish to return (stay) to the current form (form5) to enter the data. The way it works now is when O.K. is clicked, the program continues on to form2 without being able to enter the data.
How can I stop the execution of the program and enter data on Form5?
How can I stop the execution of the program and enter data on Form5?
VB Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 'Checks to make sure text box had an entry. If Me.TextBox2.Text = "" Then MessageBox.Show("You must enter a path and file name.") '**************code to stay on form5 to enter path and file in TextBox2.*************** '************************************************ Else End If Me.Hide() Form2.Show() End Sub