Intermittent error, Method 'Copy' of object 'Shape' failed

Status
Not open for further replies.

sparky2205

Active Member
Joined
Feb 6, 2013
Messages
481
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi folks,
I've had a lot of help from the forum with the file in this link: List of Hazardous Substances - MrExcel.xlsm to get me to this point.
The original post was titled "Insert a picture from another worksheet".
But now that I'm almost there I have one final problem that I can't resolve.
The spreadsheet is designed to get the correct pictogram from a hidden sheet called Pictograms when the button on the worksheet Tabelle2 is pressed.
The problem is that intermittently it throws a runtime error "Method 'Copy' of object 'Shape' failed" on the line ThisWorkbook.Worksheets("Pictograms").Shapes(BEZEICHNUNG).Copy
There is no pattern to when this happens. It is totally random. Sometimes the file will also close during execution.
The Pictograms sheet is hidden and password protected with password - Test - but I don't think this is the issue as it works fine sometimes.
@GWteB helped me previously by building a checker for this issue but the problem still persists.

Any help would be much appreciated with this.
If any clarifications are required let me know.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Hi, first check the content of the variable …​
 
Upvote 0
Hi Marc,
could you be a little more specific?
I'm not a newbie with vba but I'm not at the level of you gurus either.
 
Upvote 0
Duplicate to: Insert a picture from another worksheet

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,746
Messages
6,126,648
Members
449,325
Latest member
Hardey6ix

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