<div style='background-color: none transparent;'></div>

Pages

Home » , » THIRD ACTIVITY MSGBOX

THIRD ACTIVITY MSGBOX

SCREENSHOT 


CODE

Private Sub cmdCri_Click()
cri = MsgBox("Im a Critical Message Box", vbCritical + vbRetryCancel, "Critical ")
If cri = vbRetry Then
    lblMt.Caption = "Critical Box"
    lblBs.Caption = "Retry"
ElseIf cri = vbCancel Then
    lblMt.Caption = "Critical Box"
    lblBs.Caption = "Cancel"
End If
End Sub

Private Sub cmdExc_Click()

exc = MsgBox("Im an Exclamation Message Box", vbExclamation + vbAbortRetryIgnore, "Exclamation")
   
If exc = vbAbort Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Abort"
ElseIf exc = vbRetry Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Retry"
ElseIf exc = vbIgnore Then
    lblMt.Caption = "Exclamation Box"
    lblBs.Caption = "Ignore"
End If
End Sub

Private Sub cmdInf_Click()
inf = MsgBox("Im a Information Box", vbInformation + vbOKCancel, "Information Box")

If inf = vbOK Then
    lblMt.Caption = "Information Box"
    lblBs.Caption = "Ok"
ElseIf inf = vbCancel Then
    lblMt.Caption = "Information Box"
    lblBs.Caption = "Cancel"
End If
End Sub

Private Sub cmdInp_Click()
Dim answer As String
answer = InputBox("Enter Your Name", "Input Box")
lblIb.Caption = answer
End Sub

Private Sub cmdQue_Click()
que = MsgBox("Im a Question Message Box", vbQuestion + vbYesNo, "Question Box")
If que = vbYes Then
    lblMt.Caption = "Question Box"
    lblBs.Caption = "Yes"
ElseIf que = vbNo Then
    lblMt.Caption = "Question Box"
    lblBs.Caption = "No"

End If
End Sub
Share this article :

No comments :

Post a Comment

 
Copyright © 2011. datasavvy . All Rights Reserved
Company Info | Contact Us | Privacy policy | Term of use | Widget | Advertise with Us | Site map
Template Modify by Creating Website . Inpire by Darkmatter Rockettheme Proudly powered by Blogger