Sub test() Dim sr As ShapeRange, s1 As Shape, s2 As Shape Set sr = ActiveSelectionRange If sr.Count <> 3 Then MsgBox "3 shapes must be selected": Exit Sub Set s1 = sr(3).Intersect(sr(1), False, True) Set s2 = sr(2).Intersect(sr(1), False, True)End Sub
EDIT: sorry 2nd step should be TRIM
Sub test() Dim sr As ShapeRange, s1 As Shape, s2 As Shape Set sr = ActiveSelectionRange If sr.Count <> 3 Then MsgBox "3 shapes must be selected": Exit Sub Set s1 = sr(3).Intersect(sr(1), False, True) Set s2 = sr(2).Trim(sr(1), False, True)End Sub
Thanks Mek, This worked somewhat. What I didn't realize was that after the intersect another shape was created isn't in the original SelectionRange. There are now 4 objects in the Object Manager instead of 3. i now need the trim to happen with the 4th and 2nd object. Do I create a new SelectionRange and then trim?
Hope this isn't too confusing.
Mek I finally got it to work I just changed the properties to False, False when setting s2.
Thanks for all of your help!!
Set s2 = sr(2).Trim(sr(1), False, False)