Excel-DNA / Excel-DNA/ExcelDna

Possible bug when loading XLL in "WorkbookActivate" or "WorkbookOpen" event and clearing content from a range

Open
#324 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

Hi people!

I have a bug where if I'm loading a XLL file with UDF functionality in the "WorkbookActivate" or "WorkbookOpen" event and then I try to select a range and clear it, the formula it's invoked for no reason. After either of these events ends, if I try to select the same range and delete it... the formula is not invoked (that's correct).

This is the test code about this (ClearContent is raising the formula and that's wrong):

![image](https://user-images.githubusercontent.com/60117370/85422069-c8cf9780-b53a-11ea-8483-16a836517631.png)

The parameters are constant and no relation with the cleared cells:

=PHDataColumn("TestTA","TestTicker","TestColumn")

![image](https://user-images.githubusercontent.com/60117370/85421987-b35a6d80-b53a-11ea-9476-c27a87a92a07.png)

And when the bug occurs, inside the UDF method, the method "Find" from Interop does not works and always throws this COMException: Exception from HRESULT: 0x800A03EC

Any idea how to solve it? If I load the XLL file at statup, I have another issue related to Intellisense, so it's no option.

SO: Windows 10
Office: 2016
ExcelDna.AddIn: 1.0.0
ExcelDna.Integration: 1.0.0
ExcelDna.Intellisense: 1.1.0

Thanks, regards!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.