'same code will work for ascending and descending orders
Dim arr(3)
arr(0)= 43
arr(1) ="abc"
arr(2)=5
arr(3)="xyz"
For i = 0 to Ubound(arr)-1
For j = 0 To ubound(arr)-1
If arr(j) < arr(j+1) then ' descending ' change to > , will
work for ascending as well
temp = arr(j)
arr(j) = arr(j+1)
arr(j+1)= temp
End If
Next
Next
For i = 0 to Ubound(arr)
msgbox arr(i)
Next
Regards,
Ravi S
On Wed, Jun 26, 2013 at 11:32 AM, shilpa gupta <[email protected]>wrote:
> Hi friends
>
> I want to arrange below values in ascending and descing orders, pls tell
> me how we can do it in vb scriptting
> 1. 12789567899012
>
> and
> 2. abCBAhga
>
> etc
>
> --
> --
> 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.
>
>
>
--
--
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.