+ Reply to Thread
Results 1 to 3 of 3

Save all open workbooks with new names determined dynamically

  1. #1
    Registered User
    Join Date
    01-31-2023
    Location
    Ohio
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20446) 64-bit
    Posts
    1

    Save all open workbooks with new names determined dynamically

    I admit i am not great at macros so this is probably simple but i am stuck. I am trying to build a macro that will:
    • Save all open workbooks with a new name
    • That new name is the original name with a new tagline/append at the end
    • The tagline/append is the same for all workbooks
    • The tagline/append is populated from an input box that pops up when you run the macro
    • The file should be saved with the same extension as the original file name
    • The file should be saved in the same directory as the original file


    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #1 requires good titles. "Need Help Building a Macro in Excel VBA" is too generic to tell us anything about your question. I have updated it for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 01-31-2023 at 11:38 AM. Reason: better titles please

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Save all open workbooks with new names determined dynamically

    There is one important point that is not in your spec. You have three options:

    1. Do a SaveAs, then the open file will now be open with the new name. Any changes to the file with the original name are lost, and are saved only to the new version of that file with the new name.
    2. Do #1 but do a Save first so any changes will be saved to the file with the original name before creating the new file
    3. Do SaveCopyAs, which will save a copy of the original file with the new name, but it will not be open. The open file will still be the original file with the original name.

    This code does #2.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,526

    Re: Save all open workbooks with new names determined dynamically

    Maybe exclude "Personal.xlsb"
    Experience trumps academics every day of the week and twice on Sunday.

+ 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. help combining multiple sources for a pivot
    By jigz10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2016, 04:34 PM
  2. Excel Macro to Assist in Building a Military DA Form 1379
    By Pirate 1-6 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2014, 03:37 PM
  3. building a revenue forecasting model and need calendar building help
    By miken33 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 03-11-2013, 06:53 PM
  4. Building a macro
    By raphiduani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2012, 01:58 AM
  5. Replies: 2
    Last Post: 10-08-2012, 12:49 PM
  6. Macro Building
    By IMHer80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2012, 10:15 AM
  7. Building Excel Macro for counting interations and cell value
    By joshjpang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2010, 11:47 AM

Tags for this Thread

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