LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default formatting background color of a cell with custom colors

Sorry, I can't help with C#.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"sprasad" wrote in message
...
Hi,
Thanks for the response. I am trying do that in C#,it works in VB but

not
in C# as there is no RGB available.I tried to use
System.Drawing.Color.fromArgb() but its giving type mismatch

"Bob Phillips" wrote:

That won't work, Excel will map the colour to the nearest colour on the
colour palette.

sprasad,

You will need to define new colours to the colour palette first before

you
can use the new colour, such as

ActiveWorkbook.Colors(25) = RGB(&HCC, &HCC, &HFF)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Leith Ross"

wrote
in message

...

Hello sprasad,

Range("A1").Interior.Color = RGB( &HCC, &HCC, &HFF)

Sincerely,
Leith Ross


--
Leith Ross


------------------------------------------------------------------------
Leith Ross's Profile:

http://www.excelforum.com/member.php...o&userid=18465
View this thread:

http://www.excelforum.com/showthread...hreadid=484771








 
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
Formatting background colors Randy Excel Worksheet Functions 1 April 7th 10 12:38 PM
formatting comment's background color Bill Craig[_2_] Excel Discussion (Misc queries) 1 January 12th 10 11:12 PM
changing cell background colors with formulas postal vet Excel Worksheet Functions 5 October 30th 08 07:07 AM
restoring default fill colors, & saving with a custom color scheme WiFiMike2006 Excel Discussion (Misc queries) 3 March 28th 07 06:37 PM
Excel Cell Background Colors Disappeared JerryI Excel Discussion (Misc queries) 6 March 24th 05 10:05 PM


All times are GMT +1. The time now is 06:36 PM.

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

About Us

"It's about Microsoft Excel"