I'm having trouble with a for loop in my program. Right now I have two arrays that are populated with arbitrary numbers. These two arrays are the same size. Basically I want the user to specify what sort of operation they want done on the arrays and then I'll perform them (given that the arrays are the same dimensions). Below is the code for me trying to populate an answer array with the difference between the original two arrays:
If (LCase(diffOrPercent = "difference")) Then
For iRow = 1 To totalRow
For iCol = 1 To totalCol
answerArray(iRow, iCol) = s2Array(iRow, iCol) - s3Array(iRow, iCol)
Next iCol
Next iRow
End If
The problem that I'm having is that the answerArray is entirely blank when I try to print it out. Does anyone know what's going on?
Note: The same error occurs if the for loops go from 0 to end - 1, when i put the following:
answerArray(iRow, iCol) = s2Array(iRow, iCol).Value2 - s3Array(iRow, iCol).Value2
As well as when I put Value instead of Value2.
Thank you,
Jesse Smothermon