Not completely clear to me
But I'll take a guess and possibly provide few hints how to go about it.
I presume your polygon will be in front of excel grid and you want to color the grid and you have a lookup table in excel to select the color based on some business rule in your polygon.
Let's say you already have the color value looked up. On to the color syntax:
If a cell is selected, the syntax would be
Selection.Interior.ColorIndex = someNumber 0,255,37…
If not selected, you could address, in a loop or individually, each cell you want to colour, generally using a syntax such as
You can try recording a macro for the entire process, pickup the syntax from there, then modify it for some flexibility, i.e. not fixed cell addresses.
Recording is the best way, anyway, especially that in the UK it just might read Colou
Once you record, F1 over VBA keywords takes you to help which explains what you recorded in great detail and then you can make Excel sing.
Edited after rereading your post, and guessing some more:
You might be asking about coloring the polygon itself, i.e. my guesses are incorrect. If so, I can't give you an answer quickly, because it will involve addressing drawing objects in VBA rather than Excel ranges. Someone else would need to jump in if that's the case.
Edited by tos226, 26 May 2005 - 10:05 PM.