从网上找来觉得不错的一个方法~
Function DiffArray(arrA, arrB)
Dim dicAB : set dicAB = CreateObject("Scripting.Dictionary")
Dim dicBA : set dicBA = CreateObject("Scripting.Dictionary")
Dim vItem
For each vItem in arrA
dicAB.Item(vItem) = 0
Next
For Each vItem in arrB
If dicAB.Exists(vItem) Then
dicAB.Remove vItem
Else
dicBA.Item(vItem) = 0
End If
Next
If dicAB.Count = 0 and dicBA.Count = 0 Then
DiffArray = true
Else
DiffArray = false
End If
End Function