To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com<mailto:exceldna+unsubscribe@googlegroups.com>.
Hi,
Perhaps your COM objects are being garbage collected, and then the events don’t fire anymore.
You might like to keep a list of Workbook and Worksheet objects that you are watching.
-Govert
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com<mailto:exceldna+u...@googlegroups.com>.
To post to this group, send email to exce...@googlegroups.com<mailto:exce...@googlegroups.com>.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com<mailto:exceldna+unsubscribe@googlegroups.com>.
To post to this group, send email to exce...@googlegroups.com<mailto:exce...@googlegroups.com>.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Hi Leigh,
Yes – Excel will clear the Undo stack when you manipulate the sheet from a macro.
I don’t know of a any to avoid that.
It sounds like your 2D array return would work very well with the new “Dyanmic Array” feature of Excel.
For older Excel versions my recommendation is the ArrayResizer approach (https://excel-dna.net/2011/01/30/resizing-excel-udf-result-arrays/) but that has the disadvantage of clearing the undo stack among other problems.
For using ExcelDnaUtil.Application you need to reference the Excel Primary Interop Assemblies (PIAs).
You can either add these as references to your project, or install the “ExcelDna.Interop” package from NuGet, which add the PIAs from Excel 2010 to your project.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/34e05c3d-9a16-4b93-99b4-7edb529c04c4%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to exce...@googlegroups.com.
Hi Leigh,
The “ExcelDna.ComInterop” namespace is not related to what you want to do.
You need to install a package from NuGet, called “ExcelDna.Interop”.
After installing this, you should see three extra References in your project:

Do you see this?
After that you should be able to do
using Microsoft.Office.Interop.Excel;
in your code.
-Govert
From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of Leigh Tilley
Sent: 4 December 2019 12:33
To: Excel-DNA <exce...@googlegroups.com>
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/bebd59ba-b37f-45c4-8c80-aa986bd205f6%40googlegroups.com.