Detect XLL function in a workbook upon open

22 views
Skip to first unread message

Rich Russell

unread,
Mar 26, 2026, 3:34:49 PM (7 days ago) Mar 26
to Excel-DNA
Is there a way to detect if a workbook contains a function from an XLL addin?  Two XLLs are loaded, MAIN and SUB.  I want the MAIN to detect, when a workbook is opened, if the workbook contains a function from the SUB XLL. I'm familiar with the openworkbook event, I just don't know what other programming to use, if any.

Thanks in advance for any help.

Sergey Zhilyakov

unread,
Mar 26, 2026, 3:49:05 PM (7 days ago) Mar 26
to exce...@googlegroups.com
Hi,

since you are able to handle the openworkbook event, the strategy would be to search for the respective function by its name using the Range.Find method, i.e.:
  1. Iterate through all worksheets within the workbook,
  2. Call Worksheet.UsedRange to get the used range,
  3. Use Range.Find to search for your function.

Best regards
Sergey

On Thu, Mar 26, 2026 at 8:34 PM Rich Russell <richx...@gmail.com> wrote:
Is there a way to detect if a workbook contains a function from an XLL addin?  Two XLLs are loaded, MAIN and SUB.  I want the MAIN to detect, when a workbook is opened, if the workbook contains a function from the SUB XLL. I'm familiar with the openworkbook event, I just don't know what other programming to use, if any.

Thanks in advance for any help.

--
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 visit https://groups.google.com/d/msgid/exceldna/2c742674-66f3-4d5b-a809-c31997db718fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages