Cannot paste the data error for specific login

Excelmasters

Board Regular
Joined
Jun 11, 2015
Messages
115
Hello All,

Mrexcel has been always helpful for me whenever i am stuck.

Am going through a strange behavior in my code.

Below is my code
Code:
For i = Starta To Enda    For j = 3 To BL.Cells(Rows.Count, 2).End(xlUp).Row


        If pa.Cells(i, Cola) = BL.Cells(j, 2) Then
        BL.Cells(j, 3).CopyPicture xlScreen, xlBitmap
        
        pa.Paste Destination:=pa.Cells(i + rtr1, rtr)
        
        End If


    Next
Next


Basically the above code works well, it is copying some pictures from one sheet and pasting into other sheets beside the chart into cells.

The above macro works well in a machine for one user but the same macro throws error (paste method of worksheet class failed and shows error at the code pa.Paste Destination:=pa.Cells(i + rtr1, rtr) ) in the same machine for different user login. neither its system issue nor user issue .. can you please help if someone has already come across these kind of issues and fixed. it would be really helpful if someone helps me on this. thanks.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Thread closed.

after lot of research i have found the way which i had to make the sleep of 500 milliseconds inside the loop to properly copy and paste.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

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