Avatar of mwhitworth
mwhitworth
Flag for Ireland

asked on 

Compare Two Arrays, Output to third array

I have a script that need to compare two arrays (one single and one multidimensional) and output matches to a third multidimensional array.  For some reason it just won't work for me - gives me a subscript out of range.  Any ideas?


m=0
n=0
f=0
 
For m=0 To ubound(arrAllUsers,2)
  For n=0 To ubound(arrUserList) 
      If arrAllUsers(1,m) = arrUserList(n) Then
         'We have a match. 
          wscript.Echo "Match: " & arrAllUsers(1,m)
         'Getting the error here...          
          arrFinalList(f) = arrAllUsers(m)
           f=f+1
      End If
  Next
Next

Open in new window

Visual Basic Classic

Avatar of undefined
Last Comment
GrahamSkan

8/22/2022 - Mon