I have the following code:
Code: Select all
For i = (OutFirstRow + 11) to OutFirstRow step -1
j = i - OutFirstRow
k = (j- inKeyPos) Mod 11
If (k < 0) Then
k = 12 + k
End If
OutSheet.getCellByPosition(OutCapoCol,i).Value = k 'This call works
OutSheet.getCellByPosition(OutPlayedCol,i).Value = keys(k) 'This call writes zero to the cells
Next i
The output goes to the correct cells.
But, the output into the cell that should contain an entry from the keys array only contains zero
However, when I add a line that says MsgBox keys(k) that says the right key.
How can I get the string into the cell?