• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.

    MsgBox – Message Box

    • MsgBox
    • MsgBox(prompt, buttons, title, helpfile, context)
    • Prompt : The text of the message to display in the message box dialog.
    • Buttons :The sum of the Button, Icon, Default Button, and Modality constant values.
    • Title : The title displayed in the Title-bar of the message box dialog.
    • Helpfile :An expression specifying the name of the help file to provide help functionality for the dialog.
    • Context : An expression specifying a context ID within helpfile.


    MSGBOX – Buttons

    Constant
    Value
    Description
    vbOKOnly
    0
    Display OK button only.
    vbOKCancel
    1
    Display OK and Cancel buttons.
    vbAbortRetryIgnore
    2
    Display Abort, Retry, and Ignore buttons.
    vbYesNoCancel
    3
    Display Yes, No, and Cancel buttons.
    vbYesNo
    4
    Display Yes and No buttons.
    vbRetryCancel
    5
    Display Retry and Cancel buttons.
    vbCritical
    16
    Display Critical Message icon.
    vbQuestion
    32
    Display Warning Query icon.
    vbExclamation
    48
    Display Warning Message icon.
    vbInformation
    64
    Display Information Message icon.
    vbDefaultButton1
    0
    First button is default.
    vbDefaultButton2
    256
    Second button is default.
    vbDefaultButton3
    512
    Third button is default.
    vbDefaultButton4
    768
    Fourth button is default.
    vbApplicationModal
    0
    Application modal; the user must respond to the message box before continuing work in the current application.
    vbSystemModal
    4096
    System modal; all applications are suspended until the user responds to the message box.

    MSGBOX – Return values

    Constant
    Value
    Button
    vbOK
    1
    OK
    vbCancel
    2
    Cancel
    vbAbort
    3
    Abort
    vbRetry
    4
    Retry
    vbIgnore
    5
    Ignore
    vbYes
    6
    Yes
    vbNo
    7
    No



    Msgbox – demo

    ž  Example:
          sMsg = "This is line 1" & vbNewLine & "This is line 2"
          MsgBox sMsg
          MsgBox "Hahaha...I am just laughing..Just like that :):)"
         
          MsgBox "Hahaha...I am just laughing.." & vbNewLine & "Just like that :):)“
          MsgBox ("All Done")
    MyVar = MsgBox ("Hello Friend",0, "QuickTest QTP @ GAReddy")
    MsgBox MyVar
    MyVar = MsgBox ("Are you really interested?",3, "QuickTest QTP @ GAReddy")
    MsgBox MyVar

    'vbYesNoCancel

    MyVar = MsgBox ("Are you really interested?",vbYesNoCancel, "QuickTest QTP @ GAReddy")
    MsgBox MyVar
    • var=MsgBox("Hiiiiiiiiiii",4,"GAReddy")
    • msgbox var
    • MyVar = MsgBox ("Hello Friend",0, "QuickTest QTP @ GAReddy")
    • MsgBox MyVar
    • MyVar = MsgBox ("Are you really interested?",3, "QuickTest QTP @ GAReddy")
    • MsgBox MyVar
    o   'vbYesNoCancel
    o   MyVar = MsgBox ("Are you really interested?",vbYesNoCancel, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",256, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",512, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",768, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",0, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",4096, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",64, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",48, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    Reactions:

    QTP @ MsgBox

    MsgBox – Message Box

    • MsgBox
    • MsgBox(prompt, buttons, title, helpfile, context)
    • Prompt : The text of the message to display in the message box dialog.
    • Buttons :The sum of the Button, Icon, Default Button, and Modality constant values.
    • Title : The title displayed in the Title-bar of the message box dialog.
    • Helpfile :An expression specifying the name of the help file to provide help functionality for the dialog.
    • Context : An expression specifying a context ID within helpfile.


    MSGBOX – Buttons

    Constant
    Value
    Description
    vbOKOnly
    0
    Display OK button only.
    vbOKCancel
    1
    Display OK and Cancel buttons.
    vbAbortRetryIgnore
    2
    Display Abort, Retry, and Ignore buttons.
    vbYesNoCancel
    3
    Display Yes, No, and Cancel buttons.
    vbYesNo
    4
    Display Yes and No buttons.
    vbRetryCancel
    5
    Display Retry and Cancel buttons.
    vbCritical
    16
    Display Critical Message icon.
    vbQuestion
    32
    Display Warning Query icon.
    vbExclamation
    48
    Display Warning Message icon.
    vbInformation
    64
    Display Information Message icon.
    vbDefaultButton1
    0
    First button is default.
    vbDefaultButton2
    256
    Second button is default.
    vbDefaultButton3
    512
    Third button is default.
    vbDefaultButton4
    768
    Fourth button is default.
    vbApplicationModal
    0
    Application modal; the user must respond to the message box before continuing work in the current application.
    vbSystemModal
    4096
    System modal; all applications are suspended until the user responds to the message box.

    MSGBOX – Return values

    Constant
    Value
    Button
    vbOK
    1
    OK
    vbCancel
    2
    Cancel
    vbAbort
    3
    Abort
    vbRetry
    4
    Retry
    vbIgnore
    5
    Ignore
    vbYes
    6
    Yes
    vbNo
    7
    No



    Msgbox – demo

    ž  Example:
          sMsg = "This is line 1" & vbNewLine & "This is line 2"
          MsgBox sMsg
          MsgBox "Hahaha...I am just laughing..Just like that :):)"
         
          MsgBox "Hahaha...I am just laughing.." & vbNewLine & "Just like that :):)“
          MsgBox ("All Done")
    MyVar = MsgBox ("Hello Friend",0, "QuickTest QTP @ GAReddy")
    MsgBox MyVar
    MyVar = MsgBox ("Are you really interested?",3, "QuickTest QTP @ GAReddy")
    MsgBox MyVar

    'vbYesNoCancel

    MyVar = MsgBox ("Are you really interested?",vbYesNoCancel, "QuickTest QTP @ GAReddy")
    MsgBox MyVar
    • var=MsgBox("Hiiiiiiiiiii",4,"GAReddy")
    • msgbox var
    • MyVar = MsgBox ("Hello Friend",0, "QuickTest QTP @ GAReddy")
    • MsgBox MyVar
    • MyVar = MsgBox ("Are you really interested?",3, "QuickTest QTP @ GAReddy")
    • MsgBox MyVar
    o   'vbYesNoCancel
    o   MyVar = MsgBox ("Are you really interested?",vbYesNoCancel, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",256, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",512, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",768, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",0, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",4096, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",64, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar
    o   MyVar = MsgBox ("Are you really interested?",48, "QuickTest QTP @ GAReddy")
    o   MsgBox MyVar