+ Reply to Thread
Results 1 to 8 of 8

create multiple files using save as with list as title

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    Harrisonburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    create multiple files using save as with list as title

    Ok, so this is my first post since I normally just use the vast knowledge that has been dispersed on previous threads, but this one is more than a little stretch for me.

    I have a template .jpg file that I would like copy multiple times and name each file according to a value found in a excel list and I am looking for a macro that could do that for me. In other words, I would like to open the file and save as A1, then save as A2, then save as A3, etc.

    The closest thing that I have found is the following thread that works to open the template, but I can't figure out if I can save as and close it using the same macro.

    http://www.excelforum.com/excel-prog...ith-macro.html

    Thanks,
    Daryl

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: create multiple files using save as with list as title

    Daryl,

    Welcome to the forum!
    Give ths a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-31-2012
    Location
    Harrisonburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: create multiple files using save as with list as title

    Thanks tigeravatar,

    That is almost perfect. The script worked, but I would actually like to save the new images as images (.jpg) instead of spreadsheet. What do I need to change to get that to happen?

    Daryl

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: create multiple files using save as with list as title

    Daryl,

    Since you're just copying the image files instead of putting the images in workbooks and then saving the workbooks, the code gets much simpler. Give this a try:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 08-01-2012 at 10:44 AM.

  5. #5
    Registered User
    Join Date
    07-31-2012
    Location
    Harrisonburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: create multiple files using save as with list as title

    Tigeravatar,

    Worked like a charm and saved me a ton of time. Thanks so much.

    Daryl

  6. #6
    Registered User
    Join Date
    07-31-2012
    Location
    Harrisonburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: create multiple files using save as with list as title

    Tigeravatar,

    So, I ran into a wall. I ran your macro script and it worked fine, in fact, it worked too well. I changed a bunch of files before I was ready to. So we reverted back to a backup version of the destination folder and since then I have not been able to get the macro to work. In fact I can't get either of your scripts to work now when both worked before. They don't give me an error or anything, so it seems like they are working, but nothing happens.

    Do you have any idea what might be causing this? Or at least point me in a direction of something to try?

    Thanks,

    Daryl

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: create multiple files using save as with list as title

    Daryl,

    Both scripts assume that the list of names is in Sheet1 column A, and there is more than 1 name listed. If that is not the case, the script exits itself because it found no data. That's the only thing I can think of that would cause that kind of behaviour. You might also check to make sure the initial folder paths and file names are correct in the code after your restore.

    If you do have the list of names in the 1st sheet column A and there is more than one name listed, I'd have to see a sample workbook that is experiencing the issue. When I test the code, it still runs fine for me.

  8. #8
    Registered User
    Join Date
    07-31-2012
    Location
    Harrisonburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: create multiple files using save as with list as title

    Tigeravatar,

    Wow, totally did not even think about that. I was indeed trying to run the script with one entry. As soon as I put in two entries, it worked fine.

    Thanks again,

    Daryl

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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