View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Anthony Berglas Anthony Berglas is offline
external usenet poster
 
Posts: 23
Default Colors Shapes vs Cells (Excel 2007)

Thanks for pointing this out. shape -- cell subtract 7 for colors,
and subtract 8 for patterns.

Next problem:-
MyShape.Fill.ForeColor.SchemeColor
works in XL 2003, but not 2007.

The last is a bit worrying. I would have thought that Excel would have
a large suite of regression tests, and that even the quick tests would
test that every property of every object was basically there. By Beta
2 I'm expecting almost production ready, certainly for the old
features. But maybe not.

Does anyone know whether Microsoft actually reads the SAS reports? I
fill out some but suspect that I am wasting my time. They probably
just statistically sample them for keywords from time to time.

Regards,

Anthony

Peter T wrote:
Add or subtract 7, eg

schemecolor 10 is colorindex 3
(the first 8 starting from zero apply color constants, eg vbRed)

note Charts also use a schemecolor, but these are equivalent to colorindex's
in the range 1-56, with system colours beyond

Regards,
Peter T



"Anthony Berglas" wrote in message
ups.com...
There seems to be two different color index schemes in Excel, on for
the cells and one for the shapes. So one cannot write code like

MyCell.interior.colorIndex = MyShape.Fill.ForeColor.SchemaColor

Is there any clean way to convert one to the other? I need the same
color schemes in different places.

(MyDrawingObject.interior.colorIndex was compatible with cells.)

Thanks,

Anthony