Ok, this seems like it should be the easiest thing in the world, but there is obviously something critical that I'm missing. I've done a search of the forum but can't seem to find a similar issue.
I'm writing a longer routine, but am running into an issue with filling the cell color. It simply won't let me do it. Cutting and pasting from the macro recorder doesn't seem to do it.
This little bit of code generates a 1004 error (Application-defined or object-defined error). The issue is with the colorindex method.
Function TESTColor() As Long
On Error Resume Next
Application.ThisCell.Interior.ColorIndex = 3
TESTColor = Err.Number
End Function
Why the heck would this generate such an error?
I'm writing a longer routine, but am running into an issue with filling the cell color. It simply won't let me do it. Cutting and pasting from the macro recorder doesn't seem to do it.
This little bit of code generates a 1004 error (Application-defined or object-defined error). The issue is with the colorindex method.
Function TESTColor() As Long
On Error Resume Next
Application.ThisCell.Interior.ColorIndex = 3
TESTColor = Err.Number
End Function
Why the heck would this generate such an error?