'Power By Endision 2007/4/11
'welcome to click my cnblogs's blog http://endisoft.cnblogs.com
Private Function IsExists()Function IsExists(ByVal strString As String, ByVal strArray() As String) As Boolean
Dim i As Integer
For i = 0 To strArray.Length - 1
If strString = strArray(i) Then
Return True
End If
Next
Return False
End Function

Private Function DistinctArray()Function DistinctArray(ByVal strArray() As String) As Array
Dim i As Integer
Dim j As Integer
Dim strArrayCmp(strArray.Length - 1) As String
j = 0
For i = 0 To strArray.Length - 1
If i = 0 Then
strArrayCmp(0) = strArray(0)
Else
If Not IsExists(strArray(i).Trim, strArrayCmp) Then
j = j + 1
strArrayCmp(j) = strArray(i).Trim
End If
End If
Next
Return strArrayCmp
End Function