title: Not able to set ActiveCell Interior Color
body: <p>The code below terminates prematurely and thus never sets the Interior Color. Any idea what I'm doing wrong? </p>
  
  <p>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.</p>
  
  <pre><code>Function Darken(c As Range) As Long 
  chg = 0.8 
  Dim clr As Long
  
   clr = ActiveSheet.Cells(c.Row, c.Column).Interior.Color  '&lt;&lt; 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)) '&lt;&lt; CODE TERMINATES HERE PREMATURELY. WHY DOESN'T IT LIKE THIS?
  
   Darken = clr 
  End Function
  </code></pre>