When there is a variable type mismatch compilation error in VBA sometimes the solution is to change how I declare the variables, but not the type. e.g.: If I have:
Dim numCables, numCaColumn, firstCableRow, numCable, numDiColumn, posInArray, j, numMaterialWDifSEColumn, numSEMaterials As Integer
And I replace it for:
Dim numCables, numCaColumn, firstCableRow, numCable, numDiColumn, posInArray, j, numMaterialWDifSEColumn As Integer
Dim numSEMaterials As Integer
Now with this change I don't have a compilation error and all is working fine.
I would like to know why this is happening.
Thanks.