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


Please Help Members By Posting Answers For Below Questions

Difference between test object and run time object?

795


What are the differences between quicktest professional (qtp) and winrunner?

815


Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?

1729


Where we can use the synchronization?

804


How you can make an action as re-usable action?

901


What are the types of properties that quick test learns while recording?

804


how to find that tools work well with your existing system?

1662


What is Test Fusion Report in QTP?

915


What is test object model in quicktest professional?

846


Where we can use the analog mode and where we can use the low – level mode?

808


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

1914


Dis advantages of XML checkpoint ?

1809


Give me some real time point of way where exactly we can conduct audits?

1718


give me the code to save all messages of inbox of gmail into a folder and notepad

1865


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1836