+ Reply to Thread
Results 1 to 11 of 11

Save macro workbook as xlsx bypassing msg box

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Save macro workbook as xlsx bypassing msg box

    Hi,

    I have a code below that automatically saves my macro based workbook in a different file in regular xlsx format. This works great when I hit the macro but how do I bypass the message box that says "the following features cannot be saved in macro-free workbooks: .VB project To save a file with these features.........." using a macro code? Of course I can click "Yes" but I want the macro code to do this for me.


    Here is the code i'm working with:
    Please Login or Register  to view this content.
    Thanks in advance!
    Last edited by kosherboy; 01-01-2014 at 11:29 AM.

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Save macro workbook as xlsx bypassing msg box

    Disable the notifications and en enable them back again.

    Please Login or Register  to view this content.
    Thanks

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Save macro workbook as xlsx bypassing msg box

    Quote Originally Posted by fredlo2010 View Post
    Disable the notifications and en enable them back again.

    Please Login or Register  to view this content.
    Thanks
    Thanks, that worked! Can you just let me know how do I save that file as the actual file name as it differs each time?
    Thanks

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Save macro workbook as xlsx bypassing msg box

    What changed? and how you know it changed. Is it based on the value of a cell?

    Thanks

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Save macro workbook as xlsx bypassing msg box

    Hi, kosherboy,

    no need for a full quote as that post stands directly before yours (and it was the only one).

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Save macro workbook as xlsx bypassing msg box

    Quote Originally Posted by fredlo2010 View Post
    What changed? and how you know it changed. Is it based on the value of a cell?

    Thanks
    No, it's not based off the value of a cell, it's based off the filename if the macro workbook. When I enter the filepath by "file name' i would assume that it would use the active file name of the macro workbook and save it as xlsx with the same filename but it doesn't.

  7. #7
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Save macro workbook as xlsx bypassing msg box

    Quote Originally Posted by HaHoBe View Post
    Hi, kosherboy,
    Hi, I tried your code but I can't figure out how to put my file path in to your code and how does your code save the macro workbook in xlsx format using the active filename?

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Save macro workbook as xlsx bypassing msg box

    Hi, kosherboy,

    how do I save that file as the actual file name as it differs each time
    Please Login or Register  to view this content.
    Ciao,
    Holger

  9. #9
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Save macro workbook as xlsx bypassing msg box

    try

    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Save macro workbook as xlsx bypassing msg box

    Quote Originally Posted by HaHoBe View Post
    Hi, kosherboy,


    [code]Sub Save_as_Macrofree()

    With ActiveWorkbook
    Application.DisplayAlerts = False
    That did the trick but I noticed that the code created an xlsx file in the destination file path (which is what I want - thanks!) and it created an xlsx file in the sourse filepath which I don't really need. Is there a way to delete that extra file? Otherwise everything is fine.

  11. #11
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Save macro workbook as xlsx bypassing msg box

    It's ok, I figured it out. I just took away the first "save as" and only used the second "save as" from your code. Thanks for all your help

+ 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. Macro Save As .xlsx dialogue box
    By LostInVB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-02-2013, 10:45 AM
  2. [SOLVED] Macro That will save XLSM as XLSX
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2013, 08:21 AM
  3. [SOLVED] Macro to save file as XLSX in the same folder from where it originated
    By balandri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 02:28 PM
  4. Replies: 6
    Last Post: 08-28-2012, 03:51 AM
  5. VBA to save a copy of .xlsm workbook as .xlsx
    By lanziniad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2012, 02:00 AM

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