I thought we had this already.
Use this code in a button labeled quit or edit the code to make it work inside a program
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim UserChoice As IntegerUserChoice = MsgBox(“Do you want to quit”, vbYesNo)If UserChoice = vbYes Then me.close()End Sub