Skip to content

Wrong calc_in_wizard default / UDF recalculation when opening a workbook #1574

Description

@edugca

OS (e.g. Windows 10 or macOS Sierra)

Windows 10

Versions of xlwings, Excel and Python (e.g. 0.11.8, Office 365, Python 3.7)

0.23.1, Office 365, Python 3.8.5

Describe your issue (incl. Traceback!)

I'm trying to develop an add-in with some udfs and I noticed that the line below (created by xlwings when of importing the udfs to the add-in) makes all udfs to return the value 0 at the opening of any workbook that makes use of them. After the workbook is opened, recalculating individually each formula returns the right value.

If (Not Application.CommandBars("Standard").Controls(1).Enabled) Then Exit Function

Removing the code line fixes the problem, but I'm wondering whether it creates a different one that I'm not aware of.

Best,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions