+ Reply to Thread
Results 1 to 2 of 2

Open external spreadsheet and save it to a folder with a specified name.

Hybrid View

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    19

    Open external spreadsheet and save it to a folder with a specified name.

    I'm looking for a macro that will allow me to click on a CommandButton in one spreadsheet that opens a separate excel file and saves the file to a folder with the name I specified in the command button spreadsheet on cell A1.

    Example:
    I have two excel files in a folder called music. One file that has the command button is called Drums. The other file is called Pianos. There is a folder within the (music) folder called 'New Files'. I would like to enter a file name title in A1 of Drums, click on the command button, and it automatically open the Piano file and save it to the 'New Files' folder with the name I placed in cell A1 of Drums. (It doesn't necessarily need to open the file but I need the data to be refreshed)

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Open external spreadsheet and save it to a folder with a specified name.

    Sub SaveAs()
    With Workbooks.Open(filepath)
        .SaveAs (newfilepath)
        .Close False
    End With
    End Sub
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

+ 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. [SOLVED] VBA Code to open Save As box in a specified folder
    By spencerwsmith in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2014, 02:32 PM
  2. [SOLVED] External source from the same folder as current open document
    By Marco-Kun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2012, 12:53 PM
  3. Replies: 17
    Last Post: 07-31-2006, 11:26 AM
  4. Force Save to specified folder on 1st open
    By Bob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2006, 01:45 PM
  5. open file from folder save in new folder
    By tim64 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-17-2005, 03:19 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