Copy/Paste Shape to active sheet

RLJ

Active Member
Joined
Mar 15, 2011
Messages
417
Office Version
  1. 365
Platform
  1. Windows
I've tried multiple versions of updating the below code from recording my actions to make it available to me on any active sheet. Every time I tried to update it to Copy the (Array("QuickLinks")) from the Quick Links Sheet and then paste it on the active sheet I get errors.

VBA Code:
Sub CopyQuickLinks()


'NEED the Active Sheet to be "Quick Links"
    ActiveSheet.Shapes.Range(Array("QucikLinks")).Select
    Selection.Copy
    Range("E1").Select
    ActiveSheet.Paste
    Range("C1").Select
End Sub

Thank you for your help!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
maybe it's because of the way you spelled QucikLinks?
 
Upvote 0
maybe it's because of the way you spelled QucikLinks?
I do see that there is a misspelling there, but I recorded a macro and it picked up the misspelling from the Shape Array, so that should not be a problem. I can run the code just fine on the sheet that I recorded it from.
 
Upvote 0
You can't run the same code from any sheet and use ActiveSheet to refer to a range array unless that range array name exists on every sheet that could be active when it runs. Not sure what it is you have so I'm not sure what to suggest as a fix. Maybe replace ActiveSheet with Sheets("Quick Links") if that is the only sheet that contains the array.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top