Copying and Adding Single Sheet in book takes 5+ Minutes

bajlewis

New Member
Joined
Nov 1, 2011
Messages
12
I'm working on a workbook that is generated via VBA. The scripts copy and paste ranges to create a larger template. I am having the vba doing the copy paste because the overall layout / calculation is similar throughout the workbook, so in order to reduce error, I generate the entire book based on a single sheet.

At a certain point, a worksheet must be copied. I'm using VBA to copy and rename the sheet. The copy/paste of a single sheet is taking 5+ minutes. I'm using a command similar to the following:

Application.Workbooks("SP Temp SL Working Copy.xlsx").Sheets("Sheet").Copy _
After:=Workbooks("SP Temp SL Working Copy.xlsx").Sheets("Sheet")
Application.Workbooks("SP Temp SL Working Copy.xlsx").Sheets("Sheet (2)").Name = "Sheet2"


Not sure why it's taking so long to copy a single sheet. I've tried clearing unused formats, turning off sheet calcs, screen updating, events, etc. Prior to the sheet copy the vba performs many copy / paste operations on a single sheet. Any other suggestions to speed up a sheet copy paste?
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Watch MrExcel Video

Forum statistics

Threads
1,109,049
Messages
5,526,488
Members
409,703
Latest member
nbkqsj7

This Week's Hot Topics

Top