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?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,717
Messages
6,126,428
Members
449,314
Latest member
MrSabo83

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