IBM Support

How to display Yes and No buttons in a Message Box using VBScript

Question & Answer


Question

How can display Yes and No buttons in a Message Box using VBScript on IBM® Rational® ClearQuest® clients?

Answer

To display message boxes in VBScript you have to use Msgbox function, if you want to display Yes or No buttons you need to pass additional parameters to the function.
Note: Msgbox is not supported on ClearQuest Web servers and can cause the server to hang.


Here is a simple VBScript example:


dim result
result = msgbox("Please select  Yes or No", 4 , "Select yes or no")

If result=6 then
msgbox "Yes selected"
else
msgbox "No selected"
end if

See the following technotes for additional information on using message boxes with ClearQuest:

  • 1267337 - How to use MsgBox in Perl hook code
  • 1152551 - How to display a message on ClearQuest Web with out using MsgBox
  • 1125997 - How to disable the Message Box in hook code for ClearQuest Web

For more information on using the MsgBox function, contact Microsoft® support.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Designer - Hooks","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;2003.06.10;2003.06.12;2003.06.13;2003.06.14;2003.06.15;2003.06.16;7.0;7.0.0.1;7.0.0.2;7.0.1;7.0.1.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

122235304

Document Information

Modified date:
16 June 2018

UID

swg21146592