Dave has offered one solution. However, you say all the shapes will be in
the same cell (although shapes are not IN a cell, they are on a layer above
the cells).
As such, Dave's approach won't work
Assuming the shapes are rectangular or using their bounding box is
sufficient, you test for overlap with this function recently posted on
microsoft.public.vb.general.discussion:
http://groups.google.co.uk/group/mi...ne+for+you+rick&rnum=1&hl=en#7b985fefb3dc65bb
Note, this is valid code, but not that clear. Read the whole thread to
understand it's meaning and simplify your own code:
Public Function RangesOverlapAmount(ByVal RangeA1 As Long, _
ByVal RangeA2 As Long, _
ByVal RangeB1 As Long, _
ByVal RangeB2 As Long) As Long
RangesOverlapAmount = Format((RangeA2 + RangeB2 - RangeA1 - _
RangeB1 - Abs(RangeA2 - RangeB2) - _
Abs(RangeA1 - RangeB1)) / 2, "0;\0")
End Function
If you have non-rectangular shapes that you have to test for overlap, a more
complex approach will be required, whereby the geometry of each shape is
taking into account.
NickHK