How would I change it so that if a person clicked no, nothing happens?
Code:Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If (e.CloseReason = CloseReason.UserClosing) Then MsgBox("Are you sure?", vbYesNo + vbQuestion, "Confirm") If vbYes Then Close() If vbNo Then End If End If End If End Sub End Class




Reply With Quote