+ Reply to Thread
Results 1 to 11 of 11

Save all open workbooks to a specified folder

  1. #1
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Save all open workbooks to a specified folder

    Hello,

    I want to create a macro that will save all open workbooks (not including the active workbook) to a specified folder.

    basically, I will open approx 5 - 10 workbooks from email attachments, then on my master sheet, I click a command button, and it should save all the opened attachements to a folder.

    can anyone assist please?



    thanks,

    mike.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Save all open workbooks to a specified folder

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Save all open workbooks to a specified folder

    Worked exactly as I hoped it would.

    Thankyou very much for your solution.

    I have 1 more question, (not sure if I should raise another thread for it)


    I now have 2 buttons on my master sheet. 1 for saving the workbooks (thanks to you) and another button to list the workbooks as hyper links in my active workbook.

    If I wanted to combine these 2 buttons into 1 button that does both jobs, could I do that? would there be much tweaking of the code? or could I simply amalgamate the 2 macros?

    here are the 2 macros;

    Please Login or Register  to view this content.
    and;

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Save all open workbooks to a specified folder

    can anyone assist with combining these 2 macros into one?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Save all open workbooks to a specified folder

    Try this
    Please Login or Register  to view this content.
    Last edited by arlu1201; 05-29-2012 at 09:50 AM. Reason: Corrected error

  6. #6
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Save all open workbooks to a specified folder

    hi Arlette,

    I get a "Run-time error '438' Object doesn't support this property or method on line;

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Save all open workbooks to a specified folder

    Change it to this
    Please Login or Register  to view this content.
    Also change this row
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    I missed out on changing mypath to fpath.

  8. #8
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Save all open workbooks to a specified folder

    Please Login or Register  to view this content.
    im getting the same "Run-time error '438' Object doesn't support this property or method" on the above line now.

    Sorry for being a pain. Your help is greatly appreciated.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Save all open workbooks to a specified folder

    Your updated code here
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Save all open workbooks to a specified folder

    Absolutely perfect.

    we got off on a bad start, but I am now forever in your debt.

    again, Sincere thanks for this.

    this has cut my workload from about 1 hour per day, to about 30 seconds per day.


    thank-you.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Save all open workbooks to a specified folder

    Am glad it worked for you. We are all here to help each other, and thats what counts. All bad things can be forgiven n forgotten.

+ 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