[RESOLVED] Do not ask again feature in MsgBox
I have a button that is supposed to close my program. When you click the button a msgbox will come up that asks for confirmation, however I would like to add a check mark that says "Do not ask me again" which will prompt the msgbox not to appear the next time that the button is clicked how can I do this?
Here is what I have so far,
Code:
Private Sub Command1_Click()
Select Case MsgBox("Do you really wish to quit this program?", vbOKCancel + vbQuestion, "Confirmation")
Case vbOK
Unload Me
End Select
End Sub
Re: Do not ask again feature in MsgBox
You'll probably need to use a Form instead of a message box so you can add the check box in there...
Then you can save the check box's value to a file or the registry and check the value of that file before showing the form.
Re: Do not ask again feature in MsgBox
Without some serious API/Subclassing you wont be able to add a checkbox to VB's standard messagebox. My suggestion is use a third party msgbox control that has this option, or to create your own msgbox replacement using a form.
1 Attachment(s)
Re: Do not ask again feature in MsgBox
Re: Do not ask again feature in MsgBox
Quote:
Originally Posted by MartinLiss
Here you go.
Thanks.
Re: Do not ask again feature in MsgBox
Now that we've helped you, you can help us by pulling down the Thread Tools menu and clicking the Mark Thread Resolved button which will let everyone know that you have your answer. Also if someone has been particularly helpful you have the ability to affect a their forum "reputation" by rating their post. BTW, no need to do it for me.
Re: Do not ask again feature in MsgBox
Quote:
Originally Posted by MartinLiss
Now that we've helped you, you can help us by pulling down the Thread Tools menu and clicking the Mark Thread Resolved button which will let everyone know that you have your answer. Also if someone has been particularly helpful you have the ability to affect a their forum "reputation" by rating their post. BTW, no need to do it for me.
Oh okay, I didn't know that :D