GET WHETHER THE GIVE NUMBER VALID OR NOT IN BETWEEN THE
GIVEN RANGE?IN VB SCRIPT(QTP)
Answer Posted / arun
'the above code was not working fine so i modified that
Validinteger 20,1,100
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
msgbox "Valid Number Thank You"
Else
msgbox "You must enter an integer between " & iMin &" and " & iMax
End If
Else
msgbox "You must enter a whole number"
End If
Else
msgbox "You must enter a number"
End If
End Function
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many types of trigger events are there in qtp?
How to execute a winrunner script in quicktest professional (qtp)?
How do you create new test sets in td?
How do we handle run-time errors?
Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance
How does qtp identify the object in the application?
Where can I find and view run-time data table?
How to give a call to another action from one action?
How did you use regular expressions in QTP and also in WR?
If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?
How do you know the location Id of an object if you know its index id?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
Give the syntax to import/export xls into qtp.
How many lines of code in each script of QTP?
How to start recording using quicktest professional (qtp)?