Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Custom Shape
I have created a custom shape on my sheet to use as a template. In the code I
use the following to copy the shape and rename it: 'Copy bar oColorBar.Copy 'Paste to Cell Me.Paste Destination:=rColorCell 'Rename Me.Shapes(Me.Shapes.Count).name = cTPM & "_" & rCell.Row Now this works fine in Excel 2003 or before. I tested this in Excel 2007 and this fails, as it seems the shapes collection is now sorted and the new shape is not necessarilty added to the bottom of the collection. So I still want to copy my tempalte shape to the sheet and get a handle on it, but I don't know it's index in the shapes collection, and it's name is some default name with a number after it. I essentially want to do a set myShape = Shapes.add(customShape). Any ideas? -- ********************* J Streger MS Office Master 2000 ed. MS Project White Belt 2003 User of MS Office 2003 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding custom list and text boxes to the custom tool bar from Excel C API | Excel Discussion (Misc queries) | |||
Adding custom list and text boxes to the custom tool bar from Excel C API | Excel Programming | |||
Adding a tip when the mouse is hovered over a shape in Excel.... | Excel Programming | |||
Adding a hyperlink to a shape | Excel Programming | |||
Programmatically adding buttons to a worksheet (Shape Object) | Excel Programming |