I was just having the same issue, and thanks to a post of SebastionDotNet somewhere here (of which for some reason I can't find the link any more) I solved the problem. You can do the following:
- add a public property to your myuserControl: Public TaskPane As Office._CustomTaskPane
-
in your Public Sub CTPFactoryAvailable add a line myuserControl.TaskPane = taskPane and remove the ctpFactory.Dispose()