+ Reply to Thread
Results 1 to 2 of 2

Force save Excel 2016 to variable filename and xlsm format

  1. #1
    Registered User
    Join Date
    10-03-2016
    Location
    Hope, RI
    MS-Off Ver
    2016
    Posts
    1

    Force save Excel 2016 to variable filename and xlsm format

    Hi All,

    I have this code working if the user clicks the save icon, but not if the user goes to "File > Save As". I'd like it to work the same way for both. Here is the code:
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    Any help would be greatly appreciated!
    Kathy B.
    Last edited by 6StringJazzer; 10-06-2016 at 12:43 PM.

  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,705

    Re: Force save Excel 2016 to variable filename and xlsm format

    When I use your code, it runs when the user goes to File > SaveAs. It fires when the user selects a folder from the SaveAs dialog box. I can test your actual file if you attach it. Under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

    I don't see what you are trying to accomplish with the SaveAsUI argument by immediately setting it to True, then using an If statement to test its value, which of course is going to be True. If you always want to take this action no matter how the user is saving the file, then you don't want an If statement.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Replies: 0
    Last Post: 03-31-2015, 05:27 AM
  2. [SOLVED] Excel 2007 macro Save .xlsm as .PDF using a cell value in the filename
    By cmartel815 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-02-2014, 12:09 PM
  3. [SOLVED] Force .xlsm to save as .xlsx or .xls in VBA
    By JayRab in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 03:13 PM
  4. [SOLVED] Force Save as .xlsm filetype
    By DJvdW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-10-2012, 09:22 AM
  5. Replies: 2
    Last Post: 08-13-2012, 05:20 PM
  6. Excel 2010 - Force to save as .xlsm file
    By kaseyleigh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2012, 10:18 AM
  7. Force user to save file with specified filename
    By jen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2006, 08:50 PM

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