Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Shape number for a connector?

Can anyone tell me what is the type (number) for MsoConnectorElbow? Is the
number the same for any Connector type?
Is there a reference on line that lists all of the type numbers for shapes?

I am using this to determine the shape that a connector is connected to:

For Each sh In ActiveSheet.Shapes

If sh.Type = 2 Then 'I think 1 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))
MsgBox "Isect1, Isect2: " & isect1 & ", " & isect2
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

Is there another way to refer to the connector other than the number? Maybe
something like xlConnectorType or something like that, that would be easier
to remember?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Shape number for a connector?


Have you ever used the VBA Object browser. it will give you the answer. On
the VBA code window right click and select object browser.
Straight = 1 elbow = 2 curve = 3

then enter MsoConnectorElbo next to the binoculars and press the binoculars.
"Dan" wrote:

Can anyone tell me what is the type (number) for MsoConnectorElbow? Is the
number the same for any Connector type?
Is there a reference on line that lists all of the type numbers for shapes?

I am using this to determine the shape that a connector is connected to:

For Each sh In ActiveSheet.Shapes

If sh.Type = 2 Then 'I think 1 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))
MsgBox "Isect1, Isect2: " & isect1 & ", " & isect2
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

Is there another way to refer to the connector other than the number? Maybe
something like xlConnectorType or something like that, that would be easier
to remember?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Shape number for a connector?

Thanks Joel - I saw that number, but I can't seem to make my code work. So I
guess I thought that the number wasn't right. Now I know it's my code...

Dan

"Joel" wrote:


Have you ever used the VBA Object browser. it will give you the answer. On
the VBA code window right click and select object browser.
Straight = 1 elbow = 2 curve = 3

then enter MsoConnectorElbo next to the binoculars and press the binoculars.
"Dan" wrote:

Can anyone tell me what is the type (number) for MsoConnectorElbow? Is the
number the same for any Connector type?
Is there a reference on line that lists all of the type numbers for shapes?

I am using this to determine the shape that a connector is connected to:

For Each sh In ActiveSheet.Shapes

If sh.Type = 2 Then 'I think 1 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))
MsgBox "Isect1, Isect2: " & isect1 & ", " & isect2
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

Is there another way to refer to the connector other than the number? Maybe
something like xlConnectorType or something like that, that would be easier
to remember?

Thanks!

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
Where are the flow shape and flow connector tabs in Vista? brad Charts and Charting in Excel 1 March 29th 08 04:53 AM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Comment Connector format laralea Excel Discussion (Misc queries) 1 September 18th 06 10:17 PM
Connector Devin Excel Discussion (Misc queries) 1 March 6th 06 10:04 PM
Excel Connector Lines JeffinDallas Charts and Charting in Excel 0 January 10th 05 05:01 PM


All times are GMT +1. The time now is 02:24 AM.

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"