One typical plan is to integrate the licensing into an add-in ribbon.
You would have a static flag or other indicator of the current licensing status, which you could check in every function if you want to disable the functions if the add-in is not licenced. Then you have an Excel-DNA ribbon extension with some UI to indicate the status and support licensing / login operations.
The exact dance between the external program and Excel might need a bit more thought. But suppose you have a button on the ribbon that shows a Windows Forms form – that would then work the same way you show.
I would suggest against automatically popping up a modal form from your add-in. That is quite hostile to someone running Excel for other reasons, of via automation.
-Govert
From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of gertja...@gmail.com
Sent: 4 July 2026 10:47
To: Excel-DNA <exce...@googlegroups.com>
Subject: [ExcelDna] Integrating LimeLM licensing code
Hi everyone,
I'm trying to integrate the LimeLM licensing code in my VB.NET add-in, but their sample code is for a "Windows Form" project, where the code below lives in the "main form". I'm trying to figure out if and where this code should sit in my Excel-DNA project... Thanks for any suggestions!
------------------------------------------------------------------
'This event handler is called when TurboActivate.exe closes.
Private Sub p_Exited(ByVal sender As Object, ByVal e As EventArgs)
' remove the event
RemoveHandler DirectCast(sender, Process).Exited, New EventHandler(AddressOf p_Exited)
' the UI thread is running asynchronous to TurboActivate closing
' that's why we can't call TAIsActivated(); directly
Invoke(New IsActivatedDelegate(AddressOf CheckIfActivated))
End Sub
Private Delegate Sub IsActivatedDelegate()
------------------------------------------------------------------
--
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/f11f95cc-7029-483b-aca7-59ef125c1980n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/ae8bc8eb-f98a-40e6-927b-90b37de886fcn%40googlegroups.com.
Hi Gert-Jan,
> Is it possible to get more detail from the system about this "exception"?
Not easily – I think you need to explore the differences between your debug and your release.
Or start with a simple add-in that works and add everything back.
That might be fastest way to find the bit that is breaking it.
If you’re stuck, let me know if you want me to have a look with you – you can send me an email directly.
-Govert