-
Form?
Hello again. Here is my next question:
Lets say like this: I make a program. And I make a "Quit" button.
When the user pushes the button there will come up a window with the question"Are you sure" and two buttons, "yes" and "No". Shall this be a new form or is there some way to write this in the msgbox. For example:
...
msgbox "Are you sure (button "Yes") (Button "No")
...
-
Re: Form?
Using QueryUnload...
Code:
MsgBox "Sure?", vbYesNo, "Quit"
Good Luck
-
Re: Form?
Quote:
Originally Posted by
vb5prgrmr
Using QueryUnload...
Code:
MsgBox "Sure?", vbYesNo, "Quit"
Good Luck
Ok thank you!
But how shall it be if whan I press Yes then form2.show and when I press no then unload me
-
Re: Form?
If this is in QueryUnload, you don't need to call Unload Me because your form will unload unless you set the Cancel parameter in that event to non-zero.
Code:
If MsgBox("Are you sure", vbYesNo, "Quit") = vbYes Then
Else ' No was pressed
End If