I am almost done with the spreadsheet where I compared two arrays and anything that was in one array and not in another got put into a third array.
I then want to put the values in the array to cells on a sheet of the workbook, but I get a subscript out of range even though the array shows a value in the debugger.
Here is the loop to print the array:
If (Not MissingLoans) = -1 Then
ThisWorkbook.Sheets("Inputs and Results").Cells(PrintCell, 1) = "No Missing Loans Found on Roll-Up"
Else
For i = 1 To (UBound(MissingLoans())) Step 1
*** ThisWorkbook.Sheets("Inputs and Results").Cells(PrintCell, 1).Value = MissingLoans(i)
PrintCell = PrintCell + 1
Next
End If
I put asterisks by the line that is giving me the out of range error, but MissingLoans(I) is showing a value. In fact Missingloans(1) is the only value in the array.
PrintCell
when it fails ? – Tim Williams"Inputs and Results"
doesn't exist. – David Zemens