+ Reply to Thread
Results 1 to 7 of 7

Saving xlsm to xlsx

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Saving xlsm to xlsx

    Greetings,
    I am using the following code to save a workbook (xlsm) to another workbook (xlsm) with the following code. However, I am needing to save the workbook (xlsm) to another workbook with xlsx. I tried modifying the code by changing the xlsm to xlsx and it does not work.
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Saving xlsm to xlsx

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Saving xlsm to xlsx

    SaveCopyAs will not allow you to change the file format.

    You would need to use the SaveAs method and specifying the new file format type. Depending on how the reset of the code is using the newly named file you may need to create a copy first and then open/saveas
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Saving xlsm to xlsx

    AlphaFrog,
    Works perfect. However, because I have Named Ranges on the original workbook, when i open the new workbook, it wants to reference the data with data links.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Saving xlsm to xlsx

    Can the formulas in the copied workbook be converted to values before saving?

  6. #6
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Saving xlsm to xlsx

    AlphaFrog,
    I apologize for the late response - I have traveling without access to the internet.
    I don't believe the formulas can be converted to values. I've been trying to figure a way to break the links with the new workbook.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: Saving xlsm to xlsx

    Simplest thing would be to use the copyas routine I suggested. That was all linkage will automatically update.

+ 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] saving from .xlsm to .xlsx
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2018, 01:14 AM
  2. saving xlsm workbook as xlsx protects the wkbook??
    By foxtrotter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-08-2017, 05:34 PM
  3. Saving an xlsm as an xlsx
    By Steven811 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2016, 07:28 AM
  4. Saving .xlsm file to .xlsx
    By BrianAll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2015, 09:23 PM
  5. Replies: 0
    Last Post: 05-20-2014, 12:01 PM
  6. Saving XLSM as XLSX and removing buttons
    By mrmarchuk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2012, 04:15 PM
  7. Saving .xlsx in a network folder through a .xlsm file
    By jambai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2011, 04:09 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