Hi David,
Your code is missing the closing ' around the sheet name and an exclamation mark:
dKArray(y, x) = Range("'TPM" & CStr(iMonth) + "'!" + sCol + CStr(y + 9)).Value
In VBA, it is better to use & to concatenate strings rather than +.
Also, rather than using syntax like this:
Range("SomeWorksheet!RangeAddress").Value
It is better to use this:
Worksheets("SomeWorksheet").Range("RangeAddress").Value
So, taking into account the above suggestions, your code would then become:
dKArray(y, x) = Worksheets("TPM" & CStr(iMonth)).Range(sCol & CStr(y + 9)).Value
Bookmarks