Playing with msgbox

0
43
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

Generally we use message box like this:
Msgbox(“My name is Sourav”)

This will prompt “My name is Sourav” with a single OK button.

But going forward in Msgbox we will need options like:
OK and Cancel button (1)
Abort Retry and Ignore button (2)
Yes No and Cancel button (3)
Yes and No button (4)
Retry and Cancel button (5)
Display Critical Icon Message (16)
Display Warning Query icon (32)
Display Display Warning Message icon (48)
Display Information Message icon (64)
First button is default (0)
Second button is default (256)
Third button is default (512)
Fourth button is default (768)

Eg: Suppose we want to make a transaction of $1000 through on-line. Instead of $1000 I gave input as $1200 wrongly.
Call cal
Calling Function:
———————-
Function catchvalue
input=inputbox(“Enter some value”)
f=printline(input)
End Function
Called Function:
——————————-
Function printline(c)
msgbox “Do you want to continue with “c
End Function
In this case if we use Msgbox(“Do you want to continue?”) then we will be getting only OK button.Even though if we entered wrong value we will be having only OK option is front of us.

Instead if we use
Msgbox”Do you want to continue “c,3

Then we will be getting 3 Options: Yes No and Cancel button

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share
Previous articleShell Scripting-Part II
Next articleObject Repository in UFT or QTP
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on [email protected]

LEAVE A REPLY

Please enter your comment!
Please enter your name here