+ Reply to Thread
Results 1 to 4 of 4

saving from .xlsm to .xlsx

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    saving from .xlsm to .xlsx

    hi,

    i have a code below that i use to clean up a workbook removing buttons and other data then saving it from a .xlsm to .xlsx it used to run fine removing shapes, deleting data and then removing also the macro codes and modules in the workbook but now it only remove the shapes, delete data but it does not remove the macro codes and module when saved as a .xlsx

    does anybody have any idea why it does not work anymore? is there another way to automatically remove the macro codes and modules when saving to a .xlsx ?
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    07-10-2017
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    430

    Re: saving from .xlsm to .xlsx

    Here's a code that saves a file as .xlsx and deletes the module (I think that's what you're trying to do?)
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: saving from .xlsm to .xlsx

    hi,

    thanks for the reply

    i tried a sample .xlsm file with macros and modules then save the file manually to a .xlsx file (excel workbook - sames as above)
    and it deleted all the macro code and modules

    i wonder why it does not work on my workbook i save the file manually also since a dialog box appears to save the file

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: saving from .xlsm to .xlsx

    so i tried to run again the code on my workbook and now it deletes the macro codes and module inside the workbook after the save as
    then i tried it another time and it did not delete the macro codes and module inside the workbook after the save as



    im now more confused, the new user of the workbook has no knowledge of deleting macro codes and module manually

    i know its a minor problem but it would be nice if excel would do this consistently


    EDIT 2

    actually found out that right after the save as, when you open the visual basic editor the macro codes and modules are still there you can still interact with it (this is what i saw right after the save as before i posted the problem i thought it was not deleted)

    but when you close the .xlsx file and open it again the macro codes and the modules would now be gone/deleted

    i dont know why it does this, im glad i found out
    Last edited by k1dr0ck; 07-27-2018 at 01:34 AM.

+ 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. 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
  2. Saving an xlsm as an xlsx
    By Steven811 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2016, 07:28 AM
  3. Saving .xlsm file to .xlsx
    By BrianAll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2015, 09:23 PM
  4. Replies: 0
    Last Post: 05-20-2014, 12:01 PM
  5. Saving xlsm file as xlsx while running macro
    By happygilmore in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 02:32 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