Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2022, 05:02 PM
BobBridges's Avatar
BobBridges BobBridges is offline How to copy a shape from one worksheet to another Windows 7 64bit How to copy a shape from one worksheet to another Office 2010 32bit
Expert
How to copy a shape from one worksheet to another
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default 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?
Reply With Quote
Reply



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
How to copy a shape from one worksheet to another 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 a shape from one worksheet to another How to copy shape format? paik1002 Drawing and Graphics 2 01-20-2016 10:53 PM
How to copy a shape from one worksheet to another How do you copy a row from one worksheet to another? mars1886 Excel Programming 3 02-11-2014 02:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft