#1
|
||||
|
||||
How to copy a shape from one worksheet to another
I don't handle Shapes much, but I'm doing some automation for a user who's created a bunch of button to navigate from one worksheet to another, and he'd like me to copy a button to a new worksheet when I create it. I can find an example of the button on another worksheet easily enough, and I see various methods for copying it. The Copy method puts a copy of the shape on the clipboard; Pickup and Apply force an existing shape to take on the characteristics of another shape; and Duplicate returns a copy of a shape.
But when it comes to putting the new shape in the new worksheet, I don't see how. All the Add methods I see in the Shapes collection (and there are quite a few) require a handful of extra arguments that specify things about the new shape that I intend to copy from the old shape, including its position on the sheet. The AddShape method, for example, requires arguments for Type, Left, Right, Width and Height. Must I specify some fake values for them and then write over the shape with a Set statement or Apply method? Seems like wasted effort. Does anyone know the better way? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
When I copy a shape into another document it becomes a picture. I want a shape. | FJM | Word | 4 | 02-24-2022 09:59 AM |
Link UserForm checkbox to corresponding shape on one worksheet and copy to 'template' worksheet | kiwimtnbkr | Excel Programming | 23 | 10-08-2020 02:32 AM |
Copy Drawing Shape in Text Box | Korny12 | PowerPoint | 0 | 01-30-2018 08:23 AM |
How to copy shape format? | paik1002 | Drawing and Graphics | 2 | 01-20-2016 10:53 PM |
How do you copy a row from one worksheet to another? | mars1886 | Excel Programming | 3 | 02-11-2014 02:12 PM |