View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Make rectangle border solid

Rightclick on the rectangle and choose Format|autoshape.
Then choose the Color and lines tab to change what you want.

I modified my recorded macro to this:

Option Explicit
Sub testme()
Dim myShape As Shape

For Each myShape In ActiveSheet.Shapes
If myShape.Type = msoAutoShape Then
If myShape.AutoShapeType = msoShapeRectangle Then
With myShape
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.SchemeColor = 65
.Fill.Transparency = 0#
.Line.Weight = 4.5
.Line.DashStyle = msoLineRoundDot
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 10
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End If
End If
Next myShape
End Sub

But it did more than you asked.

Zone wrote:

I have one shape in my worksheet ("Rectangle 1"). I somehow made the
line (border around the rectangle) have a pattern. I want to reset the
line to a solid color. I can select the shape first, but then using
record doesn't help because I can't find any button to set it back to a
solid color. TIA, and thanks to everyone for all the help in this
newsgroup. James


--

Dave Peterson