Hey all, little problem here, I'll post the code first:
- Dim foundArr() As String
-
-
'Start of loop
-
-
If InStr(Join(foundArr), sh.Cells(searchRow, "B")) = 0 Then
-
-
'inconsequential code that I know works.
-
-
ReDim Preserve foundArr(UBound(foundArr) + 1) As String
-
foundArr(UBound(foundArr)) = Replace(sh.Cells(searchRow, "B"), "-", "")
-
else
-
foundDuplicate = foundDuplicate + 1
-
end if
-
-
'End of loop
So basically it the idea is that at the start there it's supposed to check to see if the element I'm searching for is in the array (element in question is the sh.Cells item, which I know is pulling the correct data). If it does exist then it does a bunch of stuff involving that string and is then supposed to append it to the "foundArr()" array (so I can keep track of strings I've used, as I don't want duplicates, and I want to record any that WOULD have been duplicates). I don't get an error but it's not working.It doesn't appear to be increasing the array by one and appending the value to the end.