Tuesday, December 11, 2007

How to work with OK CANCEL Message Box

How to work with OK CANCEL Message Box

To work with OK CANCEL Message Box

Step 1:

Add the CommandButton in the Form:

Step 2:

Type in VB programming codes for the button. In this example, an OK/Cancel message box will be displayed after clicking on the button:

Private Sub Command1_Click()

MsgBox "Please Click Me!!!", vbOKCancel

End Sub

Step 3:

The OK/Cancel message box is displayed after clicking on the 'Click Me!!' button:

No comments: