Excel Copy All Worksheets in Workbook | VBA Macro #74

Macro Intro

If you have copied a worksheet in an Excel Workbook using the Move or Copy activity, then you know that there is much to be desired during this experience. Because this activity is designed to Move or Copy multiple clicks must be made to copy the Excel Worksheet where and how you want. It is easy to forget the small checkbox confirming you want to Copy the Excel Worksheet and not Move it which is the default behavior. The Move or Copy activity gives the appearance that you can only copy one Excel Worksheet at a time but that is not the case. You can use Ctrl or Shift to make multiple selections of Excel Worksheets before accessing the Move or Copy activity. We noticed all of this at Leverage & Lean which is why we created the Excel Copy All Worksheets macro! This Excel macro will loop through all available worksheets and copy then either immediately after the current worksheet or append to the end of all available worksheets. You will be prompted to decide via a Message Box on the Excel Worksheet copying behavior. While the Message Box can be helpful if you vary between copying worksheets immediately after or at the end of all worksheets. If this is not the case the Excel Copy All Worksheets macro can easily be set to a default copy behavior or even split out into two separate macros to avoid the prompt all together. Not only does this Excel macro provide a fast way to copy all worksheets in an Excel Workbook it also gives you the opportunity to customize the naming convention of the newly copied worksheet with some simple code updates. If you are looking for something more robust and simply put AWESOME, then checkout our Insider version of the Excel Copy All Worksheets macro! The Insider version of this Excel macro will allow you to only copy the worksheets you select vs the entire worksheet collection. Also, if you want to copy worksheets to a different Excel Workbook this macro will prompt you to select between the Active Excel Workbook vs other Excel Workbooks currently open!

See it in Action

Watch this video to see this macro in action.


Here is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Excel 16.0 Object Library

Insider Content

Here is the Insider code for this macro. Brief Description of differences between FREE Code and Insider Code. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Excel 16.0 Object Library


First time using VBA?

The Developer Tab is an additional section of the ribbon when activated allows you access to Visual Basic in Applications like Access, Excel, Outlook, PowerPoint, Word.
Setup Now
Once the Developer Tab is available you will have the capability to update your security to allow Macros to run in the current application.
Setup Now
A sub of code is a collection of objects and variables. For the code to successfully run a library of references needs to be set.
Setup Now
Subscribe as an Insider to receive additional rights.
If you like our content and want to show your support tip us here!

Contact Us

Looking to improve your computer processes?
Leverage & Lean is here to help!

Powered By MemberPress WooCommerce Plus Integration

Free Macro

Start creating Less Clicks, More Results today!