Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color of a shape
I have a rectangle in a spreadsheet, when I click on it I run a macro to do
some things and I want to change it's color. I have the following code but it does not work: With ActiveSheet.Shapes("Rectangle 9") .Fill .ForeColor .RGB = RGB(0, 0, 0) End With What is wrong? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing color of a shape
this is the code i got when i filled a rectangle pink:
ActiveSheet.Shapes("Rectangle 1").Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 45 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid so it appears that yours should be: With ActiveSheet.Shapes("Rectangle 9") .Fill.ForeColor.RGB = RGB(0, 0, 0) End With hope that helps somewhat :) susan On Aug 7, 3:17*pm, Mike wrote: I have a rectangle in a spreadsheet, when I click on it I run a macro to do some things and I want to change it's color. *I have the following code but it does not work: * * With ActiveSheet.Shapes("Rectangle 9") * * * * .Fill * * * * .ForeColor * * * * .RGB = RGB(0, 0, 0) * * End With What is wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing a shape font to bold with VB | Excel Discussion (Misc queries) | |||
shape color | Excel Discussion (Misc queries) | |||
Changing color of node in freeform shape | Excel Programming | |||
Legends - Changing the Shape of | Charts and Charting in Excel | |||
VBA Help with changing shape color for selected shapes only | Excel Programming |