Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
How can we set the interior color of a cell with custom colors other than color index values..like say i wan to set "#ccccff" this as background color of cell. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting background colors | Excel Worksheet Functions | |||
formatting comment's background color | Excel Discussion (Misc queries) | |||
changing cell background colors with formulas | Excel Worksheet Functions | |||
restoring default fill colors, & saving with a custom color scheme | Excel Discussion (Misc queries) | |||
Excel Cell Background Colors Disappeared | Excel Discussion (Misc queries) |