View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default xl2000 vs. xl2003 RangeFromPoint and Grouped Shape

Greg,
I've never used RangeFromPoint. Maybe...

For Each Shp In ActiveSheet.Shapes
If Shp.Type = msoGroup Then
MsgBox Shp.Parent.Name & vbCr & Shp.Name
End If
Next

-or possibly modify this...

Sub GroupedShapesAreWhere()
Dim Shp As Excel.Shape
Dim shpRng As Excel.ShapeRange
Dim arrShps() As Variant
Dim x As Long
Dim N As Long

For Each Shp In ActiveSheet.Shapes
If Shp.Type = msoGroup Then
x = Shp.GroupItems.Count
ReDim arrShps(1 To x)
For N = 1 To x
arrShps(N) = Shp.GroupItems(N).Name
Next
Set shpRng = ActiveSheet.Shapes.Range(arrShps)
MsgBox shpRng.Parent.Name
End If
Next
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Greg Wilson"

wrote in message
In xl2003, RangeFromPoint returns a grouped shape. It also supports a
ParentGroup property. However, with xl2000, RangeFromPoint returns the group
items instead. And there is no ParentGroup property. I need to return the
grouped shape object for both versions and can't think of an efficient way.

Am I missing something? Ideas, suggestions? Confirmation that I'm S.O.L.
appreciated too.
Greg