VBA & Macro Problems

Fix Excel Macro Workbook Opening Without Worksheets or Data

Huda QurayshiHuda Qurayshi Nov 2, 2026 869 views

Question details

User needs to recover data and worksheets that disappear from macro-enabled Excel workbooks after saving and reopening.

Fix Excel Macro Workbook Opening Without Worksheets or Data
Product
Microsoft Excel
Device & OS
Mac
Scenario
Opening a previously saved macro-enabled workbook (.xlsm) after enabling macros.
Observed behavior
Worksheets and data completely disappear from the workbook after macros are enabled, saved, and reopened.
Before you start

Immediately stop saving over the original files to prevent permanent data loss, and create a backup copy of your workbook to use while testing these troubleshooting steps.

Solution 1Recommended

Bypass Auto-Running Macros and Inspect VBA Code

Prevent macros from running automatically on startup to determine if a script is actively hiding or deleting your worksheets.

Often, VBA code tied to the 'Workbook_Open' or 'Auto_Open' events can maliciously or accidentally alter the workbook state, setting sheets to 'VeryHidden'. Holding the Shift key overrides these auto-executing scripts.

1
Open with macros disabled

Hold down the 'Shift' key while double-clicking your Excel file. Keep holding it until the workbook fully opens to bypass automatic macros.

2
Open the VBA Editor

Press 'Option + F11' on your Mac (or 'Alt + F11' on Windows) to open the Visual Basic for Applications Editor.

3
Inspect Sheet Visibility

In the Project Explorer pane on the left, click on each worksheet name. In the Properties window below it, check the 'Visible' attribute. Change any hidden sheets to '-1 - xlSheetVisible'.

4
Review module code

Double-click 'ThisWorkbook' and look for scripts that execute on open or close events which might be modifying worksheet visibility or deleting content.

Identify Script Issues: If your data appears normally when bypassing macros, the issue is caused by the VBA script inside the file, not by file corruption or software bugs.
Free Microsoft Office alternative

Try WPS Office for Stable Macro and Data Management

If Microsoft Excel updates are causing macro compatibility issues or unexpected behavior, consider switching to WPS Office. It provides robust, reliable support for VBA and macro-enabled workbooks (.xlsm) in a lightweight, completely free, and highly compatible suite.

  1. 1. Download and install: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open your macro workbook: Launch WPS Spreadsheets and safely open your existing .xlsm files without format loss.
  3. 3. Enable or disable macros securely: Use the Developer tools in WPS Spreadsheets to safely manage, inspect, and execute your VBA code.
Seamless format compatibility with Microsoft Excel (.xlsx, .xlsm, .xls).Advanced built-in VBA support for safe and stable macro execution.Lightweight architecture reduces the risk of application crashes and workbook corruption.Completely free alternative to Microsoft Office with a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why did my worksheets disappear right after enabling macros?

Macros often contain VBA code (such as 'Workbook_Open' or 'Auto_Open') that executes immediately upon authorization. If the script contains commands to hide or delete worksheets, they will vanish as soon as you click 'Enable Macros'.

How do I unhide worksheets that were hidden by a macro?

Open the VBA Editor by pressing Option + F11 (Mac) or Alt + F11 (Windows). In the Project Explorer, click on the hidden sheet. In the Properties window below, find the 'Visible' property and change it from 'xlSheetVeryHidden' to '-1 - xlSheetVisible'.

Will reinstalling Excel restore my missing data?

No. Reinstalling Excel only fixes software application errors and bugs. If a macro has deleted or hidden data within the specific workbook file, reinstalling the software will not restore that data. You must fix the VBA code or restore a backup.

How can I open an Excel file on Mac without letting macros run?

Hold down the 'Shift' key while double-clicking the Excel file. Keep holding Shift until the workbook has fully loaded. This starts the file in a safe mode that prevents any startup macros from running automatically.