I know, the topic sounds very strange, but yesterday I worked on an excel file with VBA all the day long. After saving the file to disk I went home and todays morning the makros are lost?!

Please give me some hints, where I can search after the makros.

Enable all macros in the settings is activated and nothing is shown up in the makros list.

  • .xls? .xlsx? .xlsm?
    – jonrsharpe
    Mar 21 '14 at 9:26
  • @jonrsharpe .xlsx
    – Christian St.
    Mar 21 '14 at 9:27
  • 4
    You can't store macros in .xlsx, you should have saved it as .xlsm (Macro-enabled)
    – jonrsharpe
    Mar 21 '14 at 9:33

In Excel 2007 and above, files with macros have a different file extension.

Files without vba have the xlsx extension.

Files with macros need to be saved as a macro-enabled workbook with the xlsm extension.

For both file types there are also template variations, i.e. xltx and xltm respectively.

The default file format for a new file is xlsx, unless you change this setting in your Excel options.

If you include vba macros in the xlsx file and then try to save it, you will see a message that tells you that you cannot save macros in an xlsx file:

enter image description here

If you opt to ignore the message and save the file as a macro-free workbook, then please accept the fact that the macros will NOT be saved with the workbook.

You have seen the message. You have taken action NOT to save as a macro enabled file.

So, the macros are not saved with the file.

That's how it works.

  • I opened an Excel 2003 file (xls) that had macros. I can save the file as you suggest, but the macros are still missing. Please advise Mar 30 '15 at 12:55

Click "No": Click No

Select "Excel Macro Enabled Workbook" and click "Save": Select the Excel Macro Enabled Workbook,Click Save Option

Not the answer you're looking for? Browse other questions tagged or ask your own question.