ActiveSheet.Pictures.Paste.Select Problem

Tifa

New Member
Joined
Dec 15, 2020
Messages
19
Office Version
  1. 2019
Platform
  1. Windows
Hello!

I Recorded a macro to copy and paste some cells to another row, one of the cells contain a picture, some times the macro work and usually, it gives me 1004 error "Microsoft cannot paste the data"

Range("L2").Select
Selection.Copy
Range("L10").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 0).Range("A1").Select

ActiveSheet.Pictures.Paste.Select


the debugger always shows that the problem is in the last line above "ActiveSheet.Pictures.Paste.Select"

I tried some other pasting codes all give the same problem

how could I fix this please?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
VBA Code:
ActiveSheet.Pictures.Paste
Is enough
 
Upvote 0
VBA Code:
ActiveSheet.Pictures.Paste
Is enough
The problem is that sometimes it works without errors and sometimes or we can say most of the times it gives me 1004 error and the debugger highlights "ActiveSheet.Pictures.Paste.Select Problem"


how could I solve this
 
Upvote 0
Sorry
I've been testing your code several of time with no errors at all
 
Upvote 0
Sorry
I've been testing your code several of time with no errors at all
which version of office are you using, I'm using office 2019, I heard 2016 is more stable but I don't really know is that true or not
 
Upvote 0
which version of office are you using, I'm using office 2019, I heard 2016 is more stable but I don't really know is that true or not
which version of office are you using, I'm using office 2019, I heard 2016 is more stable but I don't really know is that true or not
Sorry, I realized now you are using 2013

the picture I m trying to copy is linked with a formula
 
Upvote 0
Sorry
I've been testing your code several of time with no errors at all
=ProductPic1

the picture is referenced to a name manager ProductPic1:

=INDEX('Data Base'!$R$2:$R$831,MATCH('Data Entry'!$F$2,'Data Base'!$Q$2:$Q$831,0))
 
Upvote 0
I read on Microsoft that some applications can interfere with the VBA code, I started ending background applications I found that the one causing the error is Ditto which is a clipboard application.


now everything is working fine.

Thanks
 
Upvote 0
Solution

Forum statistics

Threads
1,215,084
Messages
6,123,021
Members
449,092
Latest member
ikke

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