+ Reply to Thread
Results 1 to 7 of 7

Using VBA to create multiple copies of a spreadsheet file with different filenames

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Shreveport, LA, USA
    MS-Off Ver
    Office 2013
    Posts
    63

    Using VBA to create multiple copies of a spreadsheet file with different filenames

    Good morning, all. First, let me say that I don't like this setup, but the guy who did it was chosen by corporate to oversee this project and this is the way he set things up. This leaves the rest of us having to do the work part of it all, including every month creating 30 or 31 sheets for that month. As of right now, everyone creates a Day 1 (in this case, it would be named something like "X Facility 12_01_2013.xlsm") sheet. from the last day of the previous month, into a new monthly folder. Making the copies of the first day's file and then changing the file names manually gets to be a pain, especially when you have to do it for three facilities each month like I do.

    So, to re-cap and summarize, here is what I would like to be able to do somehow with VBA...

    Take "X Facility 11_30_2013.xlsm" in folder "\\...\2013\November\"and create 31 copies in folder "\\...\2013\December\" as "X Facility 12_01_2013.xlsm" and repeat with the only change in filename being the actual day, i.e. "12_01_2013", "12_02_2013", "12_03_2013", 12_04_2013", etc. I'm sure you get the point.

    OR, if it's difficult to start with a file from another folder, I can always create the first day's file and then have the VBA code help me from that point forward. I'm just trying to get rid of the long process of copying and changing the filenames for each daily file.

    Thank you!

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    Hi,

    Here you go. Hope this helps.
    Attached Files Attached Files
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    04-18-2012
    Location
    Shreveport, LA, USA
    MS-Off Ver
    Office 2013
    Posts
    63

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    This was EXACTLY what I was needing. Thank you very much, my friend!

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    You are welcome, glad i could help.

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    Here is the updated file for dates to be displayed as mm-dd-yyyy.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-18-2012
    Location
    Shreveport, LA, USA
    MS-Off Ver
    Office 2013
    Posts
    63

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    Where the heck did my post go? Well, I'll try again. Thank you VERY MUCH, my friend! Worked like a charm!!

  7. #7
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Using VBA to create multiple copies of a spreadsheet file with different filenames

    You are welcome.

    Please close this thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple .txt file import with filenames
    By luke2442 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-09-2012, 05:13 PM
  2. Replies: 9
    Last Post: 02-14-2009, 01:50 PM
  3. Replies: 2
    Last Post: 10-23-2005, 12:05 AM
  4. [SOLVED] why does excel create multiple copies (as many as 18) of a file?
    By Beezie in forum Excel General
    Replies: 6
    Last Post: 08-11-2005, 11:05 AM
  5. [SOLVED] Why does Excel create multiple copies of the same file?
    By TJRUFF in forum Excel General
    Replies: 2
    Last Post: 01-27-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1