Do not open file with VBA in Excel

TVY 5 Reputation points
2023-01-20T20:42:33.32+00:00

I have problem with open file .xlsb .xlsm in Excel (Office 365). After open file with start macros VBA code, file automatic close. In logs:

Назва аварійного застосунку: EXCEL.EXE, версія: 16.0.15928.20216, позначка часу: 0x63b610f9
Назва аварійного модуля: VBE7.DLL, версія: 0.0.0.0, позначка часу: 0x636c59bc
Код винятку: 0xc0000005
Зсув помилки: 0x000000000015cf8a
Код аварійного процесу: 0x19b0
Час запуску аварійного застосунку: 0x01d92b1ce9ebd262
Шлях до аварійного застосунку: C:\Program Files\Microsoft Office\Root\Office16\EXCEL.EXE
Шлях до аварійного модуля: C:\Program Files\Common Files\Microsoft Shared\VBA\VBA7.1\VBE7.DLL
Код звіту: c11b2e4f-7283-4623-9ba1-108d543039a8

Reinstalling Office 365 didn't work. Please help. Thanks.

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,450 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,473 questions
{count} votes

3 answers

Sort by: Most helpful
  1. TVY 5 Reputation points
    2023-02-08T20:26:24.9133333+00:00

    Thanks for your answers!

    I resolved the issue this command:

    Reg.exe add "HKCU\Software\Microsoft\Office\16.0\Excel\Options" /v "ForceVBALoadFromSource" /t REG_DWORD /d "1" /f

    1 person found this answer helpful.

  2. SanthiSwaroopNaikBukke-4908 595 Reputation points
    2023-01-20T20:44:52.59+00:00

    This issue can be caused by several factors. Some possible causes include:

    1. The macros in the file are causing an error that is causing Excel to close. This can be due to a bug in the VBA code or an issue with the macro's dependencies.
    2. The file is corrupted, which is causing Excel to crash.
    3. The version of Excel you are using is not compatible with the file format.
    4. The file could be infected with malware or virus.

    To resolve this issue, you can try the following steps:

    1. Open the file in Safe Mode by holding the CTRL key while opening Excel. This will prevent any macros from running, allowing you to access the file without the macros causing Excel to close.
    2. Try to repair the file by going to File > Info > Check for Issues > Repair.
    3. Try to open the file in a different version of Excel or a different program, such as LibreOffice or Google Sheets, to see if the issue is specific to the version of Excel you are using.
    4. Run a full scan of your computer with an updated anti-virus or anti-malware program.
    5. If none of the above steps work, it may be best to create a new copy of the file from the original source, or contact the creator of the file for assistance.
    0 comments No comments

  3. Emily Hua-MSFT 27,526 Reputation points
    2023-01-23T05:46:03.4433333+00:00

    Hi @TVY

    You can refer to Santhi Swaroop Naik Bukke's suggestions to have a check first.

    • Here is an article about "Excel crashes in VBE7.DLL running or enabling macro". There are 2 methods mentionded, please try them: Method1 - Recompile the Project and Method 2 - Disable Compile on Demand.
    • Disable macros via: Options > Trust Center > Trust Center Settings > Macro Settings > Disable Macros. Open one problematic workbook. Ignore message to enable Macros, then add a new worksheet to it , save and close it. Enable macros again via: Options > Trust Center > Trust Center Settings > Macro Settings > Enable Macros. Open the problematic workbook and execute macro to test.
    • If these steps above do not work, it's recommended to update your Office. Currently, the newest one is Version 2212 (Build 15928.20216).

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.