How to insert oval frame arund cells?

B

breeze

I need format invoice: I want make oval frames(borders) around of some of my
cell with data. When I try insert frame use Autoshapes --> main shapes ->
oval, all my data, include formatting are missing from that frame, I just got
empty frame without data. I use Excel 2000.

thanks
 
G

Gord Dibben

breeze

I am using XL 2002 and 2003 right now. Don't know about XL 2000 but.........

Right-click on the Autoshape and "Format autoshape"

Colors and Lines Tab. Set "Transparency" to 100%

Gord Dibben Excel MVP
 
M

mistral

is the way I used, the really right way for make oval frames(borders) around
of cell with data(in docs)?

Thanks,
 
G

Gord Dibben

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
 
G

Gord Dibben

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
 
M

mistral

Yes, this works.

thank you.

mistral

Gord Dibben said:
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
 
G

Gord Dibben

Thanks for the feedback.

Had forgotten all about this one from a couple weeks ago<g>

Gord

Yes, this works.

thank you.

mistral

Gord Dibben said:
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
 

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