Using VBA to create folders with preloaded spreadsheets

rachel06

Board Regular
Joined
Feb 3, 2016
Messages
84
Office Version
  1. 365
Platform
  1. Windows
Hello,

I currently have a macro that I run to create quarterly folders needed for payment processing that's pretty straight forward. Each month, we use a few different spreadsheets to do analysis, and I've been manually placing them in all of the folders after they are created. Is there something I could build into the macro that would create the folders and contain the spreadsheets we need for analysis? The spreadsheets are never renamed and are always in the same folder on the network.

Thank you! :)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Are you asking :

#1 : Create new folders on your computer? Such as: C:\Test or C:\Users\YourComputerName\Desktop\MyNewFolder ?

#2 : If the above is correct ... what are the folder names ?

#3 : Where should these folders be created ?

#4 : How many workbooks should be created ? One for each month of the year ?

#5 : What name should each of these workbooks be given ? One for each month, i.e, Jan ... Feb ... Mar ... etc ?

#6 : Are you wanting a WorkSheet or WorkSheets named something specific ? If so, what ?
 
Upvote 0
Thanks for the response! The macro I use already names the folders and places them on the network drive where they need to go. That part is taken care of. I'm wondering that, in this process of creating the folders, if a copy of existing workbooks can be in those folders after created. Like is there a way to tell the macro to grab a copy of the workbook from a specific folder/location on the network and place it in the newly created folders?
 
Upvote 0
Hmmm .... I've never worked with a NETWORK environment. If the common SAVE command works ...

Are all the workbooks currently residing in the same folder ... and no other workbooks are stored there ?

What network folder should the workbooks be copied to ?
 
Upvote 0
I could put all the workbooks I want to move in one folder with nothing else stored there. We create a new folder for each quarter, and with in that folder are more folders for each analysts groups of clients (IE the folder would be called 2020Q1 payments and within there are the folders where I'm wanting the workbooks moved to). Both the workbooks I'd like to move and the folders I'm creating are within the same folder.

A little backstory for more clarity: We create the new quarterly folder manually each month. Then we have a workbook to create the new client folders within that. Basically, in one cell we enter the destination folder for the new folders to be created, then there's a list of names for the analyst folders below that. So the macro is making empty folders and placing them where we indicate in one cell and naming them what we indicate in others.
 
Upvote 0
Here is a project that copies files from one folder to another.

The folder names are Test1 and Test2. The project first clears out Test2, then
proceeds to copy files from Test1 to Test2.

You've indicated you already have a working project that creates the folders and
files for you. So ... if you were to place those in folder Test1 ... they would
auto copy to Test2.

Now ... the macro code can be modified to change the folder names and locations so
it coincides with your existing paths there on the Network.

Your thoughts ?

Download file : Testing.zip
 
Upvote 0
Solution
I'll play around with this and let you know what I come up with.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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