none
Excel 2013 Add-in: Custom Task Pane Visibility Problem RRS feed

  • Question

  • * Windows 7

    * Visual Studio Community 2013 Edition version: 12.0.31101.00

    * .NET version: 4.5.51650

    * Microsoft Excel 2013 (15.0.4693.1000) MSO (15.0.4693.1001) 32-bit

    * Microsoft Office Developer Tools for Visual Studio 2013 (November 2014 Update)

    * Developing a VSTO Excel 2013 Add-in

    I have been having problems showing custom Task Panes, but only on certain computers. Changing the Visible property does not show the Task Pane. After much searching, I found someone else that solved this problem (http://stackoverflow.com/questions/24577747/excel-custom-task-pane-not-showing) by disabling other Add-ins. For that person, the offending Add-in was Analysis Toolpak. The Add-in disabling solution worked for me also, but in my case it was Andy Pope's "RibbonX Visual Designer".

    My point: This is a *major* problem affecting VSTO development. The fact that it's not a consistent Add-in causing the problem tells me that the real underlying cause is somewhere in *my* VSTO Excel Add-in.  Having to disable *all* other add-ins in order to get mine to work reliably does not sound like a real solution.

    I will continue to look into this but, in the meantime, has anyone resolved this problem with a solution other than "disable other Add-ins"?

    Thanks,

    Mark

    Tuesday, March 3, 2015 3:22 PM

Answers

  • Hi Marak60,

    Sorry for the confusion. As a temporary workaround​, I would recommend you disabling the "Analysis Toolpadk" add-in to make your add-in work correctly.

    To find the root cause why your add-in is conflict with "Analysis Toolpadk" add-in, since I'm not able to reproduce your issue at my side. I recommend you raise a paid support service request with us so that our engineer could work closely with you to troubleshoot this issue. If the support engineer determines that the issue is the result of a product issue, the service request will be a no-charge case and you won't be charged. Please visit the below link to see the various paid support options that are available to better meet your need.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.

    Thanks for your understanding.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, March 12, 2015 9:40 AM

All replies

  • Hello Marak,

    Nobody can guarantee that other add-ins are well-written. That's why the first suggest in such cases is to disable other add-ins.

    Where and when do you set the Visible property?

    Tuesday, March 3, 2015 4:08 PM
  • Thanks for the feedback Eugene. In this case, I'm setting the Visible property in the click event of a toggle button on the ribbon. I guess I'm just trying to get a better sense of what the conflict is, exactly. How could another (even poorly written) add-in suppress my ability to make my task pane visible, but not really affect any other functionality?

    Best regards.

    Tuesday, March 3, 2015 4:36 PM
  • Hi Mark,

    Based on your description, disable all other add-ins make your add-in work correctly, it seems that one the add-ins caused your issue.

    >>How could another (even poorly written) add-in suppress my ability to make my task pane visible, but not really affect any other functionality?

    Based on my understanding, it is possible to close the task pane window through the win32 native API. Just as you found, your issue is caused by other add-in. I suggest you to disable the add-in one-by-one to narrow down which add-in caused this issue and report this issue to the vendor of that add-in.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, March 4, 2015 11:05 AM
  • Thanks Edward, but the results are just not consistent. On one test computer, the problem is one add-in but on another computer that same add-in does not conflict, but another one does. Besides, I find it hard to believe that the "Analysis Toolpak" add-in (which has been around forever in one form or another) is causing problems with my task pane.

    Which leads me back to my original conclusion that it's *my* add-in that's causing the problem. And I was hoping to get some assistance from others who may have experienced the same problem.

    Thanks!

    Monday, March 9, 2015 3:03 PM
  • Hi Marak60,

    >> Besides, I find it hard to believe that the "Analysis Toolpak" add-in (which has been around forever in one form or another) is causing problems with my task pane.

    Do you mean that the “Analysis Toolpadk” caused your issue? In my option, when you disable the “Analysis Toolpadk” add-in, your add-in worked correctly, when you enable the “Analysis Toolpadk” add-in, your add-in worked wrong. I assume that your add-in is conflict with “Analysis Toolpadk” add-in. If so, for a workaround, you could disable the “Analysis Toolpadk” add-in. If you do not want to disable the “Analysis Toolpadk” add-in, I think you need to connect the Excel Product Team to debug your add-in one to one.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, March 10, 2015 12:40 PM
  • Edward, I do thank you for taking the time to review my post. I think I'm being pretty clear about the symptoms of my problem, the steps that seem to fix it, and the confusion I'm having with the inconsistent results.

    When you say I should "connect to the Excel Product Team", I'm not sure exactly how to go about that. Are you referring to the The Microsoft Excel Support Team Blog?  Can you please clarify?

    Wednesday, March 11, 2015 3:29 PM
  • Hi Marak60,

    Sorry for the confusion. As a temporary workaround​, I would recommend you disabling the "Analysis Toolpadk" add-in to make your add-in work correctly.

    To find the root cause why your add-in is conflict with "Analysis Toolpadk" add-in, since I'm not able to reproduce your issue at my side. I recommend you raise a paid support service request with us so that our engineer could work closely with you to troubleshoot this issue. If the support engineer determines that the issue is the result of a product issue, the service request will be a no-charge case and you won't be charged. Please visit the below link to see the various paid support options that are available to better meet your need.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.

    Thanks for your understanding.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, March 12, 2015 9:40 AM
  • I'm getting this same behavior with VSTO 2013 and a few different addins... disabling them fixes the issue.  Also of note, if i disable and renable my addin, it also fixes, so the error appears to be occurring on initialization of excel.

    I noticed this issue only seems to occur with older-style addins, i.e not VSTO.  The two i have seen it on were both XLAM files.

    Has anyone found a root cause for this? i'm opening a support case now, but without a contract ID i'm probably not getting a resolution any time today.

    Wednesday, June 15, 2016 8:04 PM
  • The work around is to move the code to initialize your TaskPane out of the AddIn's initialization section.

        public partial class ThisAddIn
        {
            private TaskPaneControl taskPaneControl1;
            private Microsoft.Office.Tools.CustomTaskPane taskPaneValue;
    
            public bool ctinitialize = false;
            private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
                //Move Custom task pane init, adding to heap, to new event
                Globals.ThisAddIn.Application.WindowActivate += Application_WindowActivate;
            }
    
            private void Application_WindowActivate(Excel.Workbook Wb, Excel.Window Wn)
            {
                InitTaskPane();
            }
    
            public void InitTaskPane()
            {
            
                if (ctinitialize == false)
                {
                taskPaneControl1 = new TaskPaneControl();
                taskPaneValue = this.CustomTaskPanes.Add(
                    taskPaneControl1, "MyCustomTaskPane");
    
                taskPaneValue.VisibleChanged +=
                    new EventHandler(taskPaneValue_VisibleChanged);
                    ctinitialize = true;
                }
            }
    }

    Unfortunately, this opens up another bug, where sometimes on load, the WindowsActivate event won't fire, so i also added this code to the button to activate the pane

        public partial class ManageTaskPaneRibbon
        {
            private void ManageTaskPaneRibbon_Load(object sender, RibbonUIEventArgs e)
    
            private void toggleButton1_Click(object sender, RibbonControlEventArgs e)
            {
                if (!ExcelAddIn1.Globals.ThisAddIn.ctinitialize)
                {
                    ExcelAddIn1.Globals.ThisAddIn.InitTaskPane();
                }
                Globals.ThisAddIn.TaskPane.Visible = ((RibbonToggleButton)sender).Checked;
            }
        }

    The root of the problem has to do with the order in which newer (Office 2010) versions of Office are loading its' addins

    Monday, July 25, 2016 8:42 PM