Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub test()
Dim shp As Shape Dim nRed As Long Dim nBlue As Long For Each shp In ActiveSheet.Shapes Select Case shp.Fill.ForeColor.SchemeColor Case 10: nRed = nRed + 1 Case 12: nBlue = nBlue + 1 End Select Next shp End Sub You will have to experiment to see what the schemecolor values are, they are not the sam e as colorindex (!) -- HTH Bob Phillips "Nimrod" wrote in message ... I've gotten great help from this group recently and am thankful. I'm hopeful someone has an answer (or web link) for the following need. I have a worksheet that has about 100 rectangles that have been renamed to various names. Some of these rectangles are red, others blue, and so forth. Is there any VBA code that will allow me to total how many of these rectangles are red, how many are blue, then plant those figures into a cell so I can total them up and create a graph? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel document with shapes on it but the shapes do not print | Excel Worksheet Functions | |||
Used drawing colors in shapes....lost default colors for "Fill Col | Excel Discussion (Misc queries) | |||
How do I save pivotchart colors and shapes on data refresh? | Charts and Charting in Excel | |||
Naming Auto Shapes and Creating new Shapes | Excel Discussion (Misc queries) | |||
How can I loop to find the grouped shapes count | Excel Programming |