View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
wolmFromAustria wolmFromAustria is offline
external usenet poster
 
Posts: 2
Default shape runtime error 438 excel 2007


I couldn't get the Name of the parent of a shape.
In my codes I often use the parent.name expression to find out
In which sheet a shape is positioned.

e.g.
Sub mytest()

Dim curshape As Shape
With ActiveSheet

Set curshape = .Shapes.AddTextbox(msoTextOrientationHorizontal, 12, 12,
12, 12)
Debug.Print curshape.Parent.Name

End With

End Sub

This works in excel 2000 and 2003 without problems.

Is this a bug of excel 2007 or is there another solution to get such info?

THX