Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
I'm a newbie trying to build a freeform shape by adding nodes via .addnodes
via a loop. Something like: ' Count = UBound(CoordArray, 1) ' With myDocument.Shapes.BuildFreeform(msoEditingCorner, CoordArray(1, 1), CoordArray(1, 2)) For counter = 1 To Count .AddNodes msoSegmentLine, msoEditingAuto, CoordArray(counter, 1), CoordArray(counter, 2) Next counter .ConvertToShape End With But it doesn't like this. -- thanks for your help. jap |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
The problem is, assuming your CoordArray values are valid, the first value in the for next loop is the same as the start point. Try this, For counter = 2 To Count Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "boyze" wrote in message ... I'm a newbie trying to build a freeform shape by adding nodes via .addnodes via a loop. Something like: ' Count = UBound(CoordArray, 1) ' With myDocument.Shapes.BuildFreeform(msoEditingCorner, CoordArray(1, 1), CoordArray(1, 2)) For counter = 1 To Count .AddNodes msoSegmentLine, msoEditingAuto, CoordArray(counter, 1), CoordArray(counter, 2) Next counter .ConvertToShape End With But it doesn't like this. -- thanks for your help. jap |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Thanks. Worked like a charm.
-- X "Andy Pope" wrote: Hi, The problem is, assuming your CoordArray values are valid, the first value in the for next loop is the same as the start point. Try this, For counter = 2 To Count Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "boyze" wrote in message ... I'm a newbie trying to build a freeform shape by adding nodes via .addnodes via a loop. Something like: ' Count = UBound(CoordArray, 1) ' With myDocument.Shapes.BuildFreeform(msoEditingCorner, CoordArray(1, 1), CoordArray(1, 2)) For counter = 1 To Count .AddNodes msoSegmentLine, msoEditingAuto, CoordArray(counter, 1), CoordArray(counter, 2) Next counter .ConvertToShape End With But it doesn't like this. -- thanks for your help. jap |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|