Skip to content

Excel 2021 LTSC zh-CN shows VBA “memory” dialog when Cellm ribbon/custom UI loads #345

Open

Description

@y2ambition-ai

Summary

On one Windows/Excel 2021 LTSC machine, loading Cellm triggers a modal Microsoft Visual Basic for Applications warning dialog. The message text is localized Chinese and appears as either 内存 or 内存ch.

After dismissing the dialog, Cellm formulas may still work, but the Cellm ribbon tab/settings UI is missing or unreliable. Excel may also offer to disable the XLL after repeated starts.

I have not found the exact Office/Excel-DNA internal root cause yet, but local testing strongly points to the Cellm Excel-DNA ribbon/custom UI registration path rather than the model provider or formula functions.

Environment

  • Cellm: 0.5.0 release / source built from getcellm/cellm commit 0bd9ea0 (v0.5.0-19-g0bd9ea0)
  • XLL: x64, loaded from %APPDATA%\Cellm\Cellm-AddIn64-packed.xll
  • Excel: Office LTSC Professional Plus 2021, 16.0.14334.20688
  • Office platform: x64
  • Office UI culture: zh-cn
  • Office updates: disabled in ClickToRun config
  • Windows: 10.0.26200, win-x64
  • .NET SDK: 9.0.314
  • .NET runtime: Microsoft.NETCore.App 9.0.16, Microsoft.WindowsDesktop.App 9.0.16
  • Excel-DNA packages in Cellm source:
    • ExcelDna.Addin 1.9.0
    • ExcelDna.Interop 15.0.1

Symptoms

  1. Install Cellm x64 release.
  2. Start Excel.
  3. A modal dialog appears:
    • Window title: Microsoft Visual Basic for Applications
    • Message text: 内存 or 内存ch
  4. The Cellm tab is not available/reliable.
  5. Excel can later add the XLL to HKCU\Software\Microsoft\Office\16.0\Excel\Resiliency\DisabledItems.
  6. During one debug run I also observed:
Initialization [Error] Integration.DnaLibraryAutoOpen Error : NullReferenceException - Object reference not set to an instance of an object.

What was tested

I rebuilt Cellm locally and tested the startup behavior by launching Excel in a clean test process and enumerating visible windows/events.

Findings:

  • Clearing Excel's disabled-item record alone did not fix the modal.
  • Removing only the cache/memory toggle from RibbonModelGroup did not fix it.
  • A minimal static customUI returned from RibbonMain.GetCustomUI() still triggered the same VBA 内存ch dialog.
  • Making RibbonMain no longer inherit from ExcelRibbon, but still leaving a public/COM-visible GetCustomUI, still triggered the dialog.
  • Disabling the public/COM-visible custom UI entry point stopped the VBA memory dialog.
  • With the ribbon/custom UI path disabled, formulas still register and work.

Verification after disabling the custom UI path:

{
  "RegisterXll": true,
  "AddInInstalled": true,
  "AddInTitle": "Cellm Add-In",
  "PromptFormula": "=PROMPT(\"ping\")",
  "PromptValue2": "pong",
  "Error": null
}

A foreground Excel startup check after that showed no VBA memory dialog, no new Office event-log error, and no Cellm disabled-item entry.

Possible separate null-reference issue

There may also be a startup-order issue around this property:

internal static string ConfigurationPath =>
    ExcelDnaUtil.XllPathInfo?.Directory?.FullName
    ?? throw new NullReferenceException("Could not get Cellm path");

In my local build, adding a fallback path avoided the DnaLibraryAutoOpen null-reference symptom. I am not sure whether that is the primary cause of the VBA memory dialog or a separate startup issue exposed while debugging.

Current workaround

For this machine, the stable workaround is to run Cellm without registering the ribbon/custom UI. The formula functions work and provider configuration can be done through appsettings.Local.json, but the Cellm ribbon/settings UI is unavailable.

Question

Could this be an Excel-DNA custom UI compatibility issue with Excel 2021 LTSC / zh-CN Office, or is there another known startup requirement for ExcelRibbon.GetCustomUI() in Cellm that I should check?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions