Shape Size in Cell

M

Mike

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
 
M

Mike

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top