Public Function ArrayCompare(A, B) As Boolean Dim I As Integer, J As Integer For I = LBound(B) To UBound(B) Dim Found As Boolean Found = False For J = LBound(A) To UBound(A) If A = B Then Found = True Exit For End If Next If Not Found Then ArrayCompare = False Exit For End If Next End Function