Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Strange problem this, I am able to get RGB colours to work in Excel from Excel VBA. But when I run the same code from my VB DLL it runs into the 56 colour palette problem and all the colour go all over the place. Anybody knows why this is happening? please remove nospamplease from email address Regards David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David,
Not quite sure what you are doing. However most "things" in Excel can only be formatted with an index that relates to a particular position on the palette, ie a ColorIndex. The format then displays whatever colour is currently assigned to this index. If you apply an RGB colour, Excel will calculate (with a not very good algorithm) the best match of the palette colours, then apply the ColorIndex to which this closest colour is assigned to. As the palette only contains 56 colours, the chances of one being the same as any of the 16,777,216 possible colours you might be trying to apply is remote (unless one of the "common" colours). If you want to apply a colour that does not exist in the palette, you need to customize one of the palette colours, manually or programmatically. Some things, such as drawing shapes, can be directly RGB formatted, rather than formatted with a palette colour. Regards, Peter -----Original Message----- Hello, Strange problem this, I am able to get RGB colours to work in Excel from Excel VBA. But when I run the same code from my VB DLL it runs into the 56 colour palette problem and all the colour go all over the place. Anybody knows why this is happening? please remove nospamplease from email address Regards David . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I use different colours in drop down menus in Excel 2003? | Excel Discussion (Misc queries) | |||
Excel 2003 & cell fill colours | Excel Discussion (Misc queries) | |||
My colours in the palette disappear at time when using Excel 2003 | Excel Discussion (Misc queries) | |||
Can't get sensible clear colours in Excel 2003 | Excel Worksheet Functions | |||
Excel 2003 font colours and cell colours | Excel Discussion (Misc queries) |