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?
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?