title: Problem in Copying the data one Excel to another Excel using VBSCript
body: <p>I have an excel sheet which contains around 1000 lines of data, i have copy these data to another sheet which satisfy the condition. In order to achieve this i have written a script, </p>
  
  <pre><code>For m = 1 To x2 'iterate single column
    For n = 1 To x4 'iterate PM_DUMP
      If InStr(PMSheet.cells(n,6).value, dupSingle.cells(m,1).value) &gt; 0 Then
        ' For p = 1 To y4
        wsc.Activate
        wsc.Rows.Item(n).Select
        wsc.Application.Selection.Copy
        wsb.Activate
        wsb.Rows(m).Select
        wsb.paste 
        wsc.Application.CutCopyMode = False
        On Error Resume Next
        Exit For 
      End If
    Next
  Next
  GetExcel2.Save
  </code></pre>
  
  <p>The execution of the script goes well up to certian limit say 350 rows the next row was getting copied fine but the entire row was highlight in Red Color after few minutes, I am getting an error " An EXCEL Encountered an error " then it closes the workbook and opens a new sheet without any data...</p>
  
  <p>Any help to resolve this issue is much appreciated. </p>
  
  <p>With Regards,
  Ramesh.T</p>