Hi, To check whether the function is in ascending or descending order. you 
can use below function directly.

Function fn_ValidateArrayOrder(arrInput, strOrderType)
    Dim blnFlag
    blnFlag = False
    Select Case UCase(strOrdertype)
        Case "ASCENDING"
            For i = 0 to Ubound(arrCRAAcntNos)-1
                If StrComp(arrInput(i), arrInput(i+1), 1) = -1 Then
                    blnFlag = True
                End If
            Next
        Case "DESCEDING"
            For i = 0 to Ubound(arrCRAAcntNos)-1
                If StrComp(arrInput(i), arrInput(i+1), 1) = 1 Then
                    blnFlag = True
                End If
            Next
    End Select
    If blnFlag Then
        fn_ValidateArrayOrder = blnFlag
    End If
End Function

Regards,
baba

On Monday, 1 April 2013 11:21:28 UTC+5:30, vijay kanaparthi wrote:
>
> Hi,
>
> how to find the ascending order and  descending order in array using 
> vbscript
>
> -- 
> Thanks & Regards,
>   Vijay
>    9916686756
>  

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to