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

Thanks Jim,

yes that was where I am searching for.

wope


"Jim Rech" wrote:

I've had problems too with my code that manipulates shapes. I know that MS
has done a lot of work getting shapes to be more consistent across the
Office 2007 suite and that's created a few problems for us.

I found this code works in Excel 2003 and 2007:

Debug.Print curshape.DrawingObject.Parent.Name

--
Jim
"wolmFromAustria" wrote in message
...

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