Hi,
Try this code:
Try this code:
Code:
call SortArray()
Function SortArray()
'================================================
'Author:QTP Lab:a touch of madness!
'Date:23/11/2009
'Description:This function sorts an array into ascending
' and descending order using .Net class methods.
'Function:SortArray()
'=========================================================
Dim myObj,MyArrAux
MyArrAux=""
Set myObj=CreateObject("System.Collections.ArrayList")
myObj.Add("Ba")
myObj.Add("R")
myObj.Add("A")
myObj.Add("Bb")
myObj.Add("S")
myObj.Add("M")
myObj.Add("D")
myObj.Add("J")
myObj.Add("Bc")
myObj.sort()
For each sNames in myObj
MyArrAux=MyArrAux& sNames &":"
Next
msgbox MyArrAux,0,"Ascending order"
Set myObj=Nothing
End Function
