View Single Post
  #7   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)

I haven't checked all of them but it works for the ones I am interested
in (vert & horizontal stripes etc.)

(Old Style means Cell formats.)

---------- Old Style --------- Pattern
SchemaColor
1 fsProtoSchemaShade 15
8
2 fsProtoRightShade 11
8
3 fsProtoBelowShade 12
8
4 fsProtoSkippedShade 9
8

---------- Shape ForeColor ---------
1 fsProtoSchemaShade 23
15
2 fsProtoRightShade 19
15
3 fsProtoBelowShade 20
15
4 fsProtoSkippedShade 17
15





Peter T wrote:
and subtract 8 for patterns.


I don't follow, there's no correlation between cell & shape patterns.

Regards,
Peter T

"Anthony Berglas" wrote in message
oups.com...
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