How to control the default button on the Message Box with Value 3
To control the default button on the Message Box with Value 3
Step 1:
Add the CommandButton in the Form:
Step 2:
Type in VB programming codes to the Command button. In this example, a Message box with value 3 will be displayed after clicking on the Command button.
Private Sub Command1_Click()
MsgBox "Hello", 3 + vbQuestion + vbDefaultButton3
End Sub
Step 3:
The Yes/No/cancel box is displayed after clicking on the Command button:
No comments:
Post a Comment