View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 141
Default unable to set the colorindex property of the font class

re the code below, the code will only execute if called
from a form when the spreadsheet is loading. If I call the
code from a button on the sheet itself I obtain an error -

"unable to set the colorindex property of the font class"

I would love an explanation of the problems with the code

Steve

Sub Reveal_Cells(Rng As Range, Default_Value As Variant)
Rng.Interior.ColorIndex = 19
Rng.Font.ColorIndex = 5
Rng.Value = Default_Value
End Sub