How to use VBA Code as a template for new monthly spreadsheets?

sunwave

New Member
Joined
Feb 28, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Is there a way to use VBA code as a template for new data sheets that I receive every month? The VBA code is supposed to act as a tool for new monthly data with the same columns, same content. How do I turn my code into a template for new data? Is there a way?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi,
Are you still looking for a solution?
Please share more on you monthly data. Can you provide an example of the new data every month? What you intent to do with the data?


For a start,
My current job is using VBA template as monthly reports. Here is how I did it:
Step 1: In template, create a sheet for "Raw Data"
Step 2: Create a sheet for any "Analysis" or "Statistics" on the "Raw Data"
Step 3: Create a sheet "Dashboard", with buttons of macros
  1. Button 1: Reset template. Use VBA to clear last month data in "Raw Data" & "Analysis"
  2. Button 2: Open filedialog, let user to choose the new data sheets for the current month, copy everything into "Raw Data" (as you said, same columns, same content)
  3. Button 3: Transform data (do whatever you wanted to analyze the data) in "Analysis"
  4. Button 4: Export sheet "Raw Data" & "Analysis" into new workbook, save as monthly report, auto-name the workbook as new month, and auto save it into a designated folder.
You may start from these step, then look for macro solutions for each step.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,972
Members
449,137
Latest member
yeti1016

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