Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default shape runtime error 438 excel 2007

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add pattern to the shape styles for charts in Excel 2007 Galina Charts and Charting in Excel 2 December 13th 07 11:10 AM
resize line or arrow shape horizontally in Excel 2007 David Excel Discussion (Misc queries) 2 September 4th 07 11:18 AM
runtime error r6025 on Excel 2007 partch Excel Discussion (Misc queries) 1 December 7th 06 04:08 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Creating Shape at runtime CG Rosén Excel Programming 2 December 5th 03 10:43 PM


All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"