Excel Save Copy of Workbook | VBA Macro #20

Macro Intro

If you are consistently creating a copy of an Excel Workbook you are spending time completing tedious repetitive tasks. Navigating to the Workbook, saving a copy, renaming the new Workbook, and potential creating a new Folder for storage. The good news is there is a better way using VBA! This Excel Macro saves a copy of the Active Workbook. By Default, the Folder Path will be the same location as the Active Workbook. Before saving, this macro will look for a folder named after the current year. Next this macro will look for a folder named as the current month. If either of these folders do not exist, they will be created automatically. The copy of the Active Workbook will be saved to the appropriate Folder Path based on the current year and month. By Default, the New Workbook’s name will be Today’s Date (MM.DD.YYYY). This macro saves you time by completing all the busy work. It is difficult to remain consistent with how you are storing new copies. This Excel macro standardizes storage by creating new folders making it easy to navigate through historical records. Take this macro to the next level and leverage the Excel Calendar Reminder Macros to schedule reoccurring actions on your Outlook Calendar. You can use the Open action to schedule an Excel Workbook to open at a specific time. You can then run this macro from the open Workbook. The Call action automates all of this, opening an Excel Workbook and calling a specific macro within it.

See it in Action

Watch this video to see this macro in action.

Code

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

Customization

These segments of code can be customized to personalize this macro.
If you want to see alerts such as a Workbook copy overwriting an existing one remove this code line
If you want to change the copied Workbook Name refer to the text “” & Format(Date, “MM.DD.YYYY”) in this code line. You can update this to include text and not just the current date. Example: “Company Payroll-” & Format(Date, “MM.DD.YYYY”)
Search

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!