I wonder How can I Change the default button In MsgBox ?, for example , I want to change it for YES to NO (for a MsgBox that use vbYesNo).
Printable View
I wonder How can I Change the default button In MsgBox ?, for example , I want to change it for YES to NO (for a MsgBox that use vbYesNo).
The DefaultButton2 will change the Default Button to the 2nd button on the MessageBox, which in this case, is NO.
Code:' Change the DefaultButton to NO.
RetVal = MsgBox("Message Box", vbYesNo + vbExclamation + vbDefaultButton2, "Message Box")