Hi
a function invoked from a worksheet cell can ONLY return values but is
not allowed to change the Excel environment (e.g. formats or other
cells). So no chance to achieve this with a formula entered in a cell.
--
Regards
Frank Kabel
Frankfurt, Germany
Avner Mediouni wrote:
I would like to write a function that will color the interior of a
cell according to RGB values.
This is my code:
Function InteriorColor(ByVal R as Integer, ByVal G as Integer, ByVal
B as Integer)
ActiveCell.Interior.Color = RGB(R, G, B)
End Function
This simple code refuse to work when I call it from a worksheet,
although it works well when activates him from another subroutine.
What is wrong ?!!
Thanks for the help
Avner
R&D Physicist
email: