+ Reply to Thread
Results 1 to 5 of 5

Save as .xlsx and not as .xlsm with VBA code

  1. #1
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Save as .xlsx and not as .xlsm with VBA code

    Good morning ppl,

    When i put some VBA code in my excel sheet and then save the document, it says that i have to save it with macros permission, .xlsm and then my excel document icon will stay with a yellow wxclamation point, is this normal?

    I am asking this because when i see examples of sheet and excel documents with macros, VBA code they are just .xlsx and not .xlsm.

    How can i change from .xlsm to .xlsx and keep my vba code?

    Thanks

  2. #2
    Registered User
    Join Date
    04-06-2010
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Save as .xlsx and not as .xlsm with VBA code

    Hi, why do you care whether the extension is .xlsm vs .xlsx? MS have specifically provided a separate file extension so it's obvious to users that these contain macros and so if you want to use VBA in workbooks your just going to have to get used to it. File extension differences along with Ribbon menus and other changes is the direction MS are going with their architecture. You will find Word and PowerPoint also has macro enabled file extensions versus standard files as well. The icon for the file extension is just that - a picture. Because it has an exclamation doesn't mean there's anything wrong with the file.

    regards,
    Graham

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Save as .xlsx and not as .xlsm with VBA code

    when i see examples of sheet and excel documents with macros, VBA code they are just .xlsx and not .xlsm.
    Where? Can you provide links to examples?

  4. #4
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    Re: Save as .xlsx and not as .xlsm with VBA code

    Quote Originally Posted by teylyn View Post
    Where? Can you provide links to examples?
    Well sorry, maybe i didnt explain very well, because i was talking about this file (TestGrey2.xls) that was made in excel version 2003 and i couldnt see the exclamation point that i was seeng in the 2007 version.

    Another thing, since i was writing some code in my excel 2007 sheets, always that i save something in the sheet it opens a window saying something like this:

    "Privacy Notice: This document contains macros, ActiveX controls, information on XML expansion pack or Web components. These may include personal information that can not be removed Across the Document Inspector."

    Its possible to disable this window?

    Best regards.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-06-2010
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Save as .xlsx and not as .xlsm with VBA code

    Hi, within Windows each file extension, such as a PDF file, a movie file or a Word document has an associated icon that's used when you view it in My Computer or Windows Explorer. MS decided that to differentiate their different file extensions they would use different icons, so that's why your seeing a difference so it's nothing to worry about.

    Macros within 2003 will work in 2007 but it's in compatibility mode so sometimes formatting and certain features aren't compatible so it's usually best to save as 2007 version if your using 2007.

    To remove message see the topic "Errors When You Create an Excel Workbook Project Based on an Existing Workbook" at http://msdn.microsoft.com/en-us/library/h8c469ey.aspx

    regards,
    Graham
    Last edited by parrynz; 04-22-2010 at 04:42 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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