Mistral
Try this one...........
Sub RoundRectangle()
Dim x, y As Single, area As Range
For Each area In Selection.Areas
With area
x = .Height * 0#
y = .Width * 0#
ActiveSheet.Rectangles.Add Top:=.Top - x, Left:=.Left - y, _
Height:=.Height + 1 * x, Width:=.Width + 1 * y
End With
With ActiveSheet.Rectangles(ActiveSheet.Rectangles.Count)
.Interior.ColorIndex = xlNone
.ShapeRange.AutoShapeType = msoShapeRoundedRectangle
End With
Next area
End Sub
Gord
Gord,
sorry, I mean the shape called "Rounded Rectangle"
breeze
----------------
Gord Dibben said:
mistral
Whatever is pleasing to the eye, I guess.
You could do it using VBA.
The following code from Bob Flanagan will put an oval around any cells you
have selected. More than one oval if the cells are non-contiguous.
Sub Z_Circle()
Dim x, y As Single, area As Range
'rotate through areas - this allows multiple circles to be drawn
For Each area In Selection.Areas
With area
' x and y are numbers that are a function of the area's
' height and width
x = .Height * 0.2
y = .Width * 0.2
'arguments top, left, height, and width must be
'supplied numeric values
ActiveSheet.Ovals.Add Top:=.Top - x, Left:=.Left - y, _
Height:=.Height + 2 * x, Width:=.Width + 2 * y
ActiveSheet.Ovals(ActiveSheet.Ovals.Count) _
.Interior.ColorIndex = xlNone
End With
Next area
End Sub
Gord