Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How many types of trigger events are there in qtp?

1005


How to execute a winrunner script in quicktest professional (qtp)?

954


How do you create new test sets in td?

1055


How do we handle run-time errors?

1035


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1907


How does qtp identify the object in the application?

962


Where can I find and view run-time data table?

969


How to give a call to another action from one action?

1098


How did you use regular expressions in QTP and also in WR?

2629


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

1085


How do you know the location Id of an object if you know its index id?

1037


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?

1832


Give the syntax to import/export xls into qtp.

1042


How many lines of code in each script of QTP?

4471


How to start recording using quicktest professional (qtp)?

1091