Skip to main content

Macro-enabled Backward Compatibility: Working with v5 and v6/v25 (.xlsm)

How to safely convert macro-enabled (.xlsm) workbooks between DataSnipper v5 and v6, v25, or v26 without losing macros or corrupting data.

When converting a v6, v25, or v26 workbook back for v5 users, Excel may reject macro-enabled files (.xlsm) with an error such as "This extension cannot be used with the selected file type." This article explains the safe path for macro-enabled backward compatibility and how to resolve the error.

Issue Description

This issue occurs when a workbook created or edited in DataSnipper v6, v25, or v26 is converted back to a format compatible with DataSnipper v5, and the workbook is macro-enabled (.xlsm). Excel blocks the direct conversion because it will not save a macro-enabled file as a non-macro file type.

Who Is This For?

  • Users on DataSnipper v6, v25, or v26 collaborating with v5 users

  • v5 users opening a workbook edited in v6, v25, or v26

Symptoms

  • Conversion fails when the source workbook is .xlsm

Quick Answer

  • Use backward conversion only when necessary. It is not recommended to keep converting the workbook to earlier versions, as it may cause data corruption. Make sure to back up the original workbook before making any changes.

  • If you must convert: make a backup first, save as .xlsx (this strips macros), convert, then re-add macros and save as .xlsm.

Steps to Convert to a Backward Version and Enable Macros

Back Up Your Workbook

  1. Make a copy of the workbook to keep the original safe.

  2. Export the macros from the original workbook. Open the .xlsm workbook and press Alt+Fn+F11 to open the VBA editor, then in the Project pane click Insert and select Module, UserForm, or Class.

    Insert menu in the VBA editor Project pane
  3. Once the item appears in the pane, right-click the Module, UserForm, or Class, select Export File, and save the .bas, .frm and .frx, or .cls file to a local path.

Remove Macros Before Converting

  1. Use Save As and choose Excel Workbook (*.xlsx). This strips all VBA code.

Convert the Clean .xlsx File

  1. Do your conversion in DataSnipper v5.

Re-add Macros

  1. After converting, use Save As and choose Excel Macro-Enabled Workbook (*.xlsm).

  2. Open the VBA Editor (Alt + F11).

  3. Import your exported .bas, .cls, or .frm files using File then Import File.

  4. Recreate any event code (for example Workbook_Open or worksheet events) if needed.

Test and Confirm

  1. Reopen the workbook and run the macros.

  2. If macros are blocked, check the Trust Center settings, or check Tools then References for missing libraries.

Known Error and Fixes

Error: "This extension cannot be used with the selected file type."

Cause: Excel reports a file type mismatch when saving a macro-enabled file to a non-macro file type during conversion.

Fix: Save to .xlsx first, then convert. After conversion, re-add the macros and save as .xlsm.

FAQ

Q: Will macros be preserved automatically?

A: No. Converting via .xlsx strips VBA. Export and import the macros to restore them.

Q: Our macros stopped running after re-import.

A: Re-check macro security settings, unblock the file, and restore any missing references in Tools then References.

Did this answer your question?