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
How many tabs are available in debug viewer pane?
Explain the use of action split in qtp?
What are the differences between qtp and winrunner?
How can you close the second opened browser?
If I change the property value at runtime is it effect is object repository?
What are the steps involved in recovery scenario wizard?
What are the views available in quicktest professional (qtp)?
Should have experience in framework means?
hi Friends ,willany body tell me what is the Scope for the automation Testing inht Future is their Or not And what is the Top Most Level in the testing section according the Pay scale
How you can make an action as re-usable action?
Hi, How Accessibility checkpoint in QTP can be implemented in the test script?
What are the differences between quicktest professional (qtp) and winrunner?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
How to check feasibility of the appliction?in automation testing?
What is the process of synchronizing qtp and aut?