GET WHETHER THE GIVE NUMBER VALID OR NOT IN BETWEEN THE
GIVEN RANGE?IN VB SCRIPT(QTP)
Answer Posted / guest
Function ValidInteger(sNumber, iMin, iMax)
Dim iNumber
' Is it a number?
If IsNumeric(sNumber) Then
' Is it an integer?
If InStr(sNumber,".") = 0 Then
' Is it in the correct range?
If CLng(sNumber) >= iMin And CLng(sNumber) <= iMax Then
ValidInteger = "Valid Number Thank You"
Else
ValidInteger = "You must enter an integer between " & iMin &
" and " & iMax
End If
Else
ValidInteger = "You must enter a whole number"
End If
Else
ValidInteger = "You must enter a number"
End If
End Function
msgbox ValidInteger(9, 1, 10)
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?
What are the challenges you faced during you entire life automation ?
What is the difference in the global and action sheet in qtp?
Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com
How to connect to a database?
How many types of recording modes in qtp? Which will be used when?
What is the difference between qtp and selenium?
How qtp identifies objects?
How to create scenario selector
What is the use of text output value in quicktest professional?
What is synchronization point in QTP?
How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
What are the different recording modes and how do they work?
How does quicktest professional (qtp) identifies the object in the application?
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain