LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default color function

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:


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add fill color or font color to if function MEDaniel Excel Worksheet Functions 7 November 9th 08 07:09 AM
Color formula function darrod64 Excel Worksheet Functions 2 August 25th 06 01:42 AM
IF function for cell color Clark Excel Worksheet Functions 1 May 22nd 06 09:43 PM
How to put color on if function aldrain Excel Worksheet Functions 5 August 8th 05 08:12 AM
cell color within a function billQ Excel Programming 3 July 18th 03 07:36 PM


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"