I have my form checked if it's dirty when a user goes to close it. If its dirty is true, the user is asked if they would like to save the data. When they click yes, the 'save event' is called. The problem I'm having is trying to get the form to completly close after saving. At the end of the save I put in me.close(), but another form closing event is triggered. Is this the correct way to dictate having the form close immediately after saving the data or is there a better way? If it is, I must have it placed in the wrong part of my code. Immediately after the "success" dialog box is displayed, I am asked if I want to save the data again.
'FormClosing If is_Dirty = True Then messagebox.show(text) =Windows.Forms.Dialogresult.Yes Then e.cancel = True Try 'Save Event Called' Messagebox.show("success") me.close() Catch ex As Exception End Try