Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building a process in Excel. How do I see the size of the shape, Jim Baker Setting up and Configuration of Excel 0 September 22nd 09 10:07 PM
Retain size of shape when copying to other sheets Boothie Excel Discussion (Misc queries) 0 August 23rd 06 02:51 PM
Cell comment boxes shouldn't change size/shape unless changed by u sam Excel Discussion (Misc queries) 1 March 3rd 05 05:23 PM
Deleting a shape and the cell contents the shape is in. Dave Peterson[_3_] Excel Programming 1 October 9th 03 03:36 PM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"