Copy & Rename a Workbook, preserve VBA. Excel 2007

Natep

New Member
Joined
Jun 3, 2016
Messages
40
Hi Gurus,

I have been browsing to find a solution but none have specifically fit the criteria I need and what testing I have done has failed.

I am attempting to leave a workbook I created years ago in the hands of those far less familiar with Excel and even less familiar with VBA and I just need to finalize it by creating a module that when executed will copy the workbook and rename it with the next year at the end of the title and preserve all VBA that I have been manually importing every year.

I just want to leave this so that at the end of the year, a user may open the December sheet and click on a button and it will copy the workbook/worksheets, clear all data on the month sheets (except the header in A1) and import VBA from the source workbook and finally rename the new workbook to Rx Monthly 2019 with the same .xlsm extension.

Workbook is named Rx Monthly 2018 with .xlsm extension. Workbook has sheets for each month and an additional sheet for static information.


Thanks in advance,
Natep
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,987
Messages
6,122,613
Members
449,090
Latest member
vivek chauhan

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