Under normal circumstances, user-defined functions do not recalculate when you open a sheet.
Exceptions would be when the file is in an older format, then Excel will recalculate when opened every time until the file is saved under the current Excel version.Async and other RTD functions have a more complicated story.
So basically your observation is correct, and that is the intended Excel behaviour.
-Govert
From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Henry Huang [xingq...@gmail.com]
Sent: 03 August 2018 09:42 AM
To: Excel-DNA
Subject: [ExcelDna] User-defined functions are not automatically calculated using Excel-DNA.
I developed a user custom function with Excel-DNA。When I opened the Excel for the first time, it can automatically calculate the formula, but when I saved Excel and turned it off, it didn't automatically calculate if I opened Excel again. My computer is win7 and Excel 2010. Is there anyone who has been in this situation?--
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 exc...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
The default async implementation (which you get when you call ExcelAsyncUtil.Run) schedules your work on the .NET ThreadPool. So you have some control over the number of threads by settings the ThreadPool properties.
You can take complete control of the async implementation by using .NET Tasks explicitly, then you can control the TaskScheduler to restrict or control the number of threads yourself. See this example: https://github.com/Excel-DNA/Samples/tree/master/LimitedConcurrencyAsync and this related discussion https://groups.google.com/forum/#!msg/exceldna/tCbtb2zmQrs/IiBsc-5xeSgJ .
-Govert