I am writing a code to copy paste data from one workbook to another workbook
I am getting an error "PasteSpecial method of Range class failed " op on clicking debug and F5 the code runs without any issues
And I have used Application.displayalerts = false,but still I am getting the error and code runs if I try to press F5
S_xlobj.Activate
S_wsObj.Select
S_wsObj.Range(ThisWorkbook.Sheets("Config").Cells(i, 3) & F1_startRow & ":" & ThisWorkbook.Sheets("Config").Cells(i, 3) & F1_Lastrow).Copy
D_xlobj.Activate
D_wsObj.Select
D_wsObj.Range(Split(Cells(1, j).Address, "$")(1) & 2).PasteSpecial xlPasteValues
I expect it should run without errors. Sometimes it runs without any error but some times I am getting this error