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 QA specialist can identify when programmatic descriptions are useful?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
What is the use of Debug Viewer?
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?
How will you check a web application for broken links using qtp?
Where you are storing your script?
What is quick test pro?
How you debug your script?
Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...
Why qtp always start action1 and does not start action?
When should I use smart identification?
how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods
What is the difference between the design-time and run-time data tables?
What is difference between design time and run time data table?
I want to know can we integrate visual source safe tool with QTP and QC for our version controlling process? WE know QTP and QC 10.0 version is having the version control inbuilt in it but I want to know the merits and demerits of the inbuilt version control tool and the visual source safe tool using QTP and QC.