none
Custom Task Panes is not visible in excel 2013 add ins. RRS feed

  • Question

  • Hi

    I have created excel 2013 add-in using Visual Studio 2013.   The custom task pane is visible in excel sheet when the code is debug and run from the Visual Studio.  If I open the excel sheet after debug and run I am able to see my add-in but Custom Task Pane is not visible.  Below is the code to understand.  Please help to get resolve this issue.

    Code for ThisAddIn.cs

    namespace ExcelAddIn2013
    {
        public partial class ThisAddIn
        {
            public MyControl myUserControl = new MyControl();
            public Microsoft.Office.Tools.CustomTaskPane customTaskPane;
    
            private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
                customTaskPane = CustomTaskPanes.Add(myUserControl, "Side Panel");
                customTaskPane.Width = 500;
                customTaskPane.Visible = false;
            }
           
            private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
            {
            }      
    
            #region VSTO generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InternalStartup()
            {
                this.Startup += new System.EventHandler(ThisAddIn_Startup);
                this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
            }
            
            #endregion
        }
    }
    

    Code for Ribbon.cs

    namespace ExcelAddIn2013
    {
        public partial class Ribbon
        {
            private void Ribbon_Load(object sender, RibbonUIEventArgs e)
            {
    
            }
    
            private void chkBox_Click(object sender, RibbonControlEventArgs e)
            {
               Globals.ThisAddIn.customTaskPane.Visible = chkBox.Checked;
            }
        }
    }

    

    Thursday, December 11, 2014 12:29 PM

All replies

  • Hello,

    It looks like you need to set the Visible property in the code to true instead:

    customTaskPane.Visible = true;

    See How to: Add a Custom Task Pane to an Application for more information.

    Thursday, December 11, 2014 1:40 PM
  • Hello Eugene

    Thanks for your response,  I have made change as you suggested, but still having the same problem.  My observation is when I run the solution from Visual Studio 2013 or open new Excel Sheet showing the Custom Task Pane. If we open the saved Excel Sheet not showing the Custom Task Pane because of "ThisAddIn_Startup" event is not fired.

    Friday, December 12, 2014 6:31 AM
  • Hi Venkata Rama Rao,

    Have you fixed this issue now?

    >>If we open the saved Excel Sheet not showing the Custom Task Pane because of "ThisAddIn_Startup" event is not fired<<

    Was the add-in is available? You can check the status of add-ins from Developers tab->Add-ins->Com Add-ins and please ensure the add-in is available.

    Regards & Fei


    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.

    Monday, December 22, 2014 8:55 AM
    Moderator