Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default problem with shapes.nodes collection in excel 2007

Hi,

Has anyone come across the following problem? The code below works fine
with Excel 2003, but in 2007 nodes.count always returns zero. Any hints
appreciated!

Many thanks,
Tim

Dim o As Shape
For Each o In ActiveSheet.Shapes
If o.Type = msoLine Then
If o.Nodes.Count = 2 Then
..etc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default problem with shapes.nodes collection in excel 2007

To clarify further, if I run the following from VBA in a clean Excel
2007 worksheet it still returns 0 instead of 2.

dim o as Shape
set o=ActiveSheet.shapes.addline (0,0,400,400)
? o.Nodes.Count
0

wrote:
Hi,

Has anyone come across the following problem? The code below works fine
with Excel 2003, but in 2007 nodes.count always returns zero. Any hints
appreciated!

Many thanks,
Tim

Dim o As Shape
For Each o In ActiveSheet.Shapes
If o.Type = msoLine Then
If o.Nodes.Count = 2 Then
..etc


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default problem with shapes.nodes collection in excel 2007

Thanks for the reply - wasn't sure though what you meant by "parsing it
to a cell"?

Incidentally, I just tried doing exactly the same in Word 2007 and in
this environment everything behaves as it should. This seems to confirm
that its an Excel 2007 bug. Any ideas

Dim o as shape
set o= ActiveDocument.shapes.addline (0,0,400,400)
? o.Nodes.Count
2

Regards,
Tim


Duncan wrote:
Hi Tim,

I ran this on 2002 SP3 and got a count of 2, so unsure why in 2007 it
would return 0. Is it to do with how you are calling the count? Have
you tried parsing it to a cell?

Regards

Duncan

wrote:
To clarify further, if I run the following from VBA in a clean Excel
2007 worksheet it still returns 0 instead of 2.

dim o as Shape
set o=ActiveSheet.shapes.addline (0,0,400,400)
? o.Nodes.Count
0

wrote:
Hi,

Has anyone come across the following problem? The code below works fine
with Excel 2003, but in 2007 nodes.count always returns zero. Any hints
appreciated!

Many thanks,
Tim

Dim o As Shape
For Each o In ActiveSheet.Shapes
If o.Type = msoLine Then
If o.Nodes.Count = 2 Then
..etc


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
Excel 2007 - Select Multiple Shapes Barb Reinhardt Excel Discussion (Misc queries) 2 March 18th 09 03:17 PM
Formatting shapes with excel 2007 Bucky Excel Discussion (Misc queries) 0 March 8th 07 07:49 PM
Anchoring shapes when printing in Excel 2007 DLF Excel Discussion (Misc queries) 2 January 2nd 07 05:14 PM
Colors Shapes vs Cells (Excel 2007) Anthony Berglas Excel Programming 8 September 21st 06 07:24 PM
TreeView: add more than one node to nodes collection Peter[_25_] Excel Programming 3 September 5th 03 12:15 PM


All times are GMT +1. The time now is 08:26 AM.

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"