Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Drawing Arcs

Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
worksheet, but I need to draw arcs by providing the start and finish points
and the radius. Is there a way to do this in Excel, or does anyone know of
an Add-in that could achieve this?

Many thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Drawing Arcs

Dear Praxis Pete:

I recorded a macro in Excel 2003 and I got the following:

ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
Selection.ShapeRange.Adjustments.Item(2) = 144.7255

The first line draws the arc in coordinate (258,62.25), width 114, height
89.25
And then modifies the ending angle to 144.7255

Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)

Hope this helps, if it does, please rate this post.
G.Morales.


"PraxisPete" wrote:

Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
worksheet, but I need to draw arcs by providing the start and finish points
and the radius. Is there a way to do this in Excel, or does anyone know of
an Add-in that could achieve this?

Many thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Drawing Arcs

Dear G.Morales

I tried recording a macro and found that i could change the start and end
points, and scale the arc but I cannot see how to specify the radius.

Thanks for replying.


"Mexage" wrote:

Dear Praxis Pete:

I recorded a macro in Excel 2003 and I got the following:

ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
Selection.ShapeRange.Adjustments.Item(2) = 144.7255

The first line draws the arc in coordinate (258,62.25), width 114, height
89.25
And then modifies the ending angle to 144.7255

Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)

Hope this helps, if it does, please rate this post.
G.Morales.


"PraxisPete" wrote:

Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
worksheet, but I need to draw arcs by providing the start and finish points
and the radius. Is there a way to do this in Excel, or does anyone know of
an Add-in that could achieve this?

Many thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Drawing Arcs

You can't specify the radius directly, but you can use the width and height.

You could make a sub such as:

sub DrawArc(single x, single y, single r, single start, single finish)

ActiveSheet.Shapes.AddShape(msoShapeArc, x, y, r, r).Select
Selection.ShapeRange.Adjustments.Item(1) = start
Selection.ShapeRange.Adjustments.Item(2) = finish

end sub


Hope that helps; if it does, please rate this post.

"PraxisPete" wrote:

Dear G.Morales

I tried recording a macro and found that i could change the start and end
points, and scale the arc but I cannot see how to specify the radius.

Thanks for replying.


"Mexage" wrote:

Dear Praxis Pete:

I recorded a macro in Excel 2003 and I got the following:

ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
Selection.ShapeRange.Adjustments.Item(2) = 144.7255

The first line draws the arc in coordinate (258,62.25), width 114, height
89.25
And then modifies the ending angle to 144.7255

Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)

Hope this helps, if it does, please rate this post.
G.Morales.


"PraxisPete" wrote:

Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
worksheet, but I need to draw arcs by providing the start and finish points
and the radius. Is there a way to do this in Excel, or does anyone know of
an Add-in that could achieve this?

Many thanks in advance.

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
drawing toolbar LWright Excel Discussion (Misc queries) 1 August 28th 06 03:19 AM
Drawing in Excel sparx Excel Discussion (Misc queries) 3 February 14th 06 06:33 PM
Drawing in Excel PraxisPete Excel Discussion (Misc queries) 2 May 27th 05 02:21 PM
Drawing on userforms Tim[_39_] Excel Programming 1 October 4th 04 06:11 PM
drawing jacob Excel Programming 1 September 7th 04 02:11 PM


All times are GMT +1. The time now is 04:10 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"