Hello miklquick
Try the program below, I think it is what you are looking for.
Of course there are different ways to program it, this is one.
You can adapt it to your application
The return value of first button in the MsgBox is not 6.
The 6 means that the 'Yes' button was pressed, this is only valid if you select cMsgBoxYesNo or cMsgBoxYesNoCancel.
With the MsgBox you should better use the constats cYes, cNo etc.
If you select for example cMsgBoxAbortRetryIgnore the return value of the first button will be cAbort = 3
I hope this helps you, best regards
Klaus
Switzerland
|