Hi My requirements are to sort the data which i am taking in an array and the remove the duplicate entries from the array and then print it in the entries,everything is fine but i am not able to think for sorting and unique.I am apsting some of my code,kindly help me out to resolve this.
Sub Click(Source As Button)
Dim w As New notesuiworkspace
Dim ss As New NotesSession
Dim db1 As notesdatabase
Dim uidoc As notesuidocument
Dim thisdoc As notesdocument
Dim note As notesdocument
'Dim date1 As Variant
Dim datetime As New NotesDateTime( "" )
Dim efromD As New NotesDateTime( "" )
Dim etoD As New NotesDateTime( "" )
Dim excelNewWkbk As Variant
Dim xlRange As String
Dim Temp(30) As String
pth="E:\IS Help Desk Local Copy 13 dec2004\IS Help Desk Changed copy 13 dec 2004\IRequest-test.nsf"
Set db1=New NotesDatabase(srv,pth)
Set uidoc=w.CurrentDocument
Set udoc = uidoc.Document
Set thisdoc = uidoc.Document
Set view=db1.getview("Test")
n=3
c=2
a=1
Set collection=db1.getview("Profile")
Set doc1=collection.GetFirstDocument
Do While Not doc Is Nothing
datetime.LSLocalTime=doc.logged(0)
efromD.LSLocalTime=thisdoc.efromD(0)
etoD.LSLocalTime=thisdoc.etoD(0)
If dateTime.DateOnly>=efromD.dateonly Then
If dateTime.DateOnly<=etoD.dateonly Then
Array=doc.r_assignedto(0)'c is used for incrementing the rows values
array1=doc.r_category(0)
'Here in array in need to sort the data and also do not need the duplicate value
Like"A,B,C,A,A,B,B------
I need only "A,B,C
Assigned=doc.r_assignedto(0)+doc.r_category(0)
Set doc1=view.getdocumentbykey(Assigned)
Set vc = view.GetAllEntriesByKey(Assigned)
B=vc.count
End If
End If
Set doc = view.getnextdocument(doc)
Loop
End Sub