Program to give a Message to the user (Program to call a Message function Box)
Taken from VB-Tutorial CDs ...
Click Show .Then a message box will appear as :
There are 3 options as Yes , No and Cancel. Click any one of them (say , Yes) .Then another box will appear as :
Taken from VB-Tutorial CDs ...
(A)Program Design :
(B) Property(Controls Used
- One Command Button with Name - Command1 and Caption - Show
(C) Attaching Code to the Object :
Private Sub Command1_Click() Dim x As Integer x = MsgBox("Do you wish to continue..?", vbYesNoCancel) If x = vbYes Then MsgBox ("YES button clicked") ElseIf x = vbNo Then MsgBox ("NO button clicked") Else MsgBox ("CANCEL button clicked") End If End Sub |
(D) Output :
(E) Errors :
If found any errors while running your VB program, or want to put your comment about any program , please click Comment section , to post.
- ====================================================================