The code below terminates prematurely and thus never sets the Interior Color. Any idea what I'm doing wrong?
A second problem is that it doesn't seem to be grabbing the background color for argument "c" properly. It seems to always use white (16777215) for the background color, even when I've set the background color to something else.
Function Darken(c As Range) As Long
chg = 0.8
Dim clr As Long
clr = ActiveSheet.Cells(c.Row, c.Column).Interior.Color '<< ALWAYS GRABS 16777215, REGARDLESS OF ACTUAL BACKGROUND COLOR
cRed = clr Mod 256
cGreen = (clr \ 256) Mod 256
cBlue = clr \ (65336)
ActiveCell.Interior.Color = RGB(Int(cRed * chg), Int(cGreen * chg), _
Int(cBlue * chg)) '<< CODE TERMINATES HERE PREMATURELY. WHY DOESN'T IT LIKE THIS?
Darken = clr
End Function