excel - Avoiding the clipboard when copying large ranges to another workbook? -


i'm interested in copying large range 1 workbook another. currently, using copy , paste functions. macro worked on smaller files, have large file , running error @ activesheet.paste. think because copying large clipboard. sound right? if so, avoid clipboard together. here code currently.

deptreceivedwb.sheets(1).cells(1, 1).currentregion.copy   apps_auditwb.activate apps_auditwb.sheets(3).select activesheet.cells(i + 1, 1).select activesheet.paste activesheet.cells(i + 1, 1).entirerow.delete 

use 1 of these:

option explicit  public sub valuescopy()     deptreceivedwb.sheets(1).cells(1, 1).currentregion         .offset(1).resize(.rows.count - 1, .columns.count).copy     end      apps_auditwb.sheets(3).cells(1, 1).pastespecial xlpastevalues end sub  public sub directcopy1()     dim cr range, fr long, lr long, fc long, lc long      set cr = deptreceivedwb.sheets(1).cells(1, 1).currentregion     fr = cr.row:    lr = fr + cr.rows.count - 2     fc = cr.column: lc = fc + cr.columns.count - 1     set cr = cr.offset(1).resize(lr, lc)      apps_auditwb.sheets(3)         .range(.cells(fr, fc), .cells(lr, lc)).value2 = cr.value2     end end sub  public sub directcopy2()     dim cr range, fr long, lr long, fc long, lc long      set cr = deptreceivedwb.sheets(1).cells(1, 1).currentregion     fr = cr.row:    lr = cr.rows.count - 1     fc = cr.column: lc = cr.columns.count     set cr = cr.offset(1).resize(lr, lc)      apps_auditwb.sheets(3)         .cells(fr, fc).resize(lr, lc).value2 = cr.value2     end end sub 

Comments