LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Why doesn't this find the connectors on my sheet?

Can anyone help me figure out why this routine never finds the connectors
(there are at least two) on the sheet?
"r" is a range, by the way.

The loop never runs, apparently it doesn't find the type 2 shape
(ConnectorElbow):

For Each sh In ActiveSheet.Shapes

If sh.Type = 2 Then 'I think 2 is a MsoConnectorElbow shape
With sh.ConnectorFormat
Set endsh = .EndConnectedShape 'endsh is the name of the
shape that the line is connected to
Set begsh = .BeginConnectedShape 'begsh is the name of the
shape at the beginning of the line.
End With
Set isect1 = Application.Intersect(Range("r"), Range(endsh.Range))
Set isect2 = Application.Intersect(Range("r"), Range(begsh.Range))
If (isect1 Is Nothing) And (isect2 Is Nothing) Then 'this is not the
droid you are looking for
'do nothing, continue in the loop
Else 'found the connector, need to kill it.
sh.Delete
End If
End If
Next sh


Thanks!
 
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
How do I delete Connectors? David Excel Worksheet Functions 1 October 6th 06 07:51 AM
Autoshapes and connectors tonywig Excel Discussion (Misc queries) 1 April 19th 06 10:32 PM
Connectors FrankLP Charts and Charting in Excel 1 December 26th 05 03:25 PM
Comments and connectors Mark Excel Discussion (Misc queries) 1 April 27th 05 01:17 AM
Shape connectors Davwe Excel Programming 3 October 4th 03 10:51 AM


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