#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default freeformbuilder

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default freeformbuilder

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 4
Default freeformbuilder

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
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



All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"