Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shape Size in Cell
Hi. I have a macro that creates a red rectangle in a
cell. The rectangle actually hides the cell borders and I do not wish it to do so. I'd like to make the rectangle "slightly" smaller than the cell dimensions. Can anyone tell me how to accomplish this? The code follows: If .Value ucl Then Set mySquare = .Parent.Shapes.AddShape (Type:=msoShapeRectangle, _ Top:=.Top, Left:=.Left, Width:=.Width, Height:=.Height) mySquare.Fill.Visible = msoFalse mySquare.Line.Weight = 1.5 mySquare.Line.ForeColor.SchemeColor = 10 End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shape Size in Cell
I believe I have answered my own question ... if I use
mycell.Width -2 and mycell.Height - 2, in the arguments for the rectangle, I get a slightly smaller box. Thanks, Mike. -----Original Message----- Hi. I have a macro that creates a red rectangle in a cell. The rectangle actually hides the cell borders and I do not wish it to do so. I'd like to make the rectangle "slightly" smaller than the cell dimensions. Can anyone tell me how to accomplish this? The code follows: If .Value ucl Then Set mySquare = .Parent.Shapes.AddShape (Type:=msoShapeRectangle, _ Top:=.Top, Left:=.Left, Width:=.Width, Height:=.Height) mySquare.Fill.Visible = msoFalse mySquare.Line.Weight = 1.5 mySquare.Line.ForeColor.SchemeColor = 10 End If . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Building a process in Excel. How do I see the size of the shape, | Setting up and Configuration of Excel | |||
Retain size of shape when copying to other sheets | Excel Discussion (Misc queries) | |||
Cell comment boxes shouldn't change size/shape unless changed by u | Excel Discussion (Misc queries) | |||
Deleting a shape and the cell contents the shape is in. | Excel Programming | |||
Deleting a shape and the cell contents the shape is in. | Excel Programming |