Dear Govert!
Today I made a strange observation. When debugging my Add-In and suspecting the Ribbon/MenuHandler, I decided to disable the MenuHandler by uncommenting the assignment to the instance variable, assuming that no Ribbon would be appearing:
Public Sub AutoOpen() Implements IExcelAddIn.AutoOpen
' necessary for ExplicitRegistration of param arrays (
https://groups.google.com/forum/#!topic/exceldna/kf76nqAqDUo)
ExcelRegistration.GetExcelFunctions().ProcessParamsRegistrations().RegisterFunctions()
ExcelRegistration.GetExcelCommands().RegisterCommands()
Application = ExcelDnaUtil.Application
' Ribbon and context menu setup
'theMenuHandler = New MenuHandler...
Now to my surprise, the menu still was there and worked completely. Now I'm wondering, whether this was changed to some "singleton" implementation or what's the reason for this working like that?
My MenuHandler looks pretty normal:
<ComVisible(True)>
Public Class MenuHandler
Inherits CustomUI.ExcelRibbon
Public Sub ribbonLoaded(theRibbon As CustomUI.IRibbonUI)
MenuHandlerGlobals.theRibbon = theRibbon
End Sub
Public Overrides Function GetCustomUI(RibbonID As String) As String
....
-regards,
Roland