+ Reply to Thread
Results 1 to 3 of 3

VBA Saving Workbook as .xlsm as default

  1. #1
    Registered User
    Join Date
    07-20-2017
    Location
    Canterbury
    MS-Off Ver
    2017
    Posts
    2

    VBA Saving Workbook as .xlsm as default

    Hello first time poster here!

    I am looking to set up a button that copies the current sheet and saves it as a separate workbook under a new name.

    My spreadsheet contains a number of forms and macros that all work as intended, the trouble comes from making the SaveAs Dialog box default to Macro enabled (.xlsm) instead of just .xls. Although it does currently function, there will be less computer savvy users interacting with this spreadsheet and I cannot for the life of me figure out how to default the file type to macr enabled.

    Any help would be appreciated!

    Here is my SaveAs code:

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor S O's Avatar
    Join Date
    06-25-2015
    Location
    England
    MS-Off Ver
    Office 2010 + 2013 + 2016
    Posts
    103

    Re: VBA Saving Workbook as .xlsm as default

    Use

    Please Login or Register  to view this content.
    instead and use that with the Workbook.Save() method.

    more info: https://msdn.microsoft.com/en-us/vba...e-method-excel

  3. #3
    Registered User
    Join Date
    07-20-2017
    Location
    Canterbury
    MS-Off Ver
    2017
    Posts
    2

    Re: VBA Saving Workbook as .xlsm as default

    Thank you that did the trick!

+ 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. Excel 2013 workbook XLSM formatting changes when saving
    By mrichard in forum Excel General
    Replies: 0
    Last Post: 08-28-2015, 08:06 AM
  2. Replies: 0
    Last Post: 05-20-2014, 12:01 PM
  3. Split .xlsm workbook into multiple xlsm workbooks w/ 1 tab each
    By JenBR in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-23-2014, 07:05 PM
  4. [SOLVED] Copy/Save As xlsm workbook to new xlsm workbook is not copying the code with it
    By Grinchy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2013, 09:30 AM
  5. Replies: 1
    Last Post: 05-23-2013, 02:04 PM
  6. VBA Help needed for saving workbook specific folder and file extension ".xlsm"
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-13-2012, 07:50 AM
  7. Saving an xlsm file as xls
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2010, 09:45 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