Copy Sheets

poleary2000

Active Member
Joined
Apr 1, 2002
Messages
354
I am using the following code to copy a worksheet:

ActiveSheet.Copy Before:=Sheets("Main Menu")

It is extremely slow in doing so. Is there better code I can be using to speed things up? I already have screen updating and calculation turned off.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
No not a tremendous amount. Last column used is AB. Last row used is 50. Should I maybe try deleting all of the blank rows and columns. There are about 4 buttons on the sheet however.
 
Upvote 0
As a rule of thumb, the less amount of formatting that you have to copy the faster it will be.

If there weren't any buttons I was going to ask you to try the following (not sure if it is faster though):

Sheet2.Range(Sheet1.UsedRange.Address).Value = Sheet1.UsedRange.Value
 
Upvote 0
Thanks for all of the help so far. I would like to try first adding the blank sheet then setting its values equal to the other sheet.

However, how do I deal with the buttons?
 
Upvote 0
The following will do it:

ActiveSheet.Shapes.SelectAll
Selection.Copy
Sheet2.Activate
ActiveSheet.Paste

But it won't keep them in the same place.
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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