Solved

Excel VB.net Add-in regenerate custom TaskPane

Posted on 2012-12-30
2
555 Views
Last Modified: 2012-12-31
Hi

I use the code below to add a custom task pane. I need to erase the task pane so that I can add it at a later point. How do I delete a taskpane so that I can use the code below to add it again?


   Private oTaskPane_Select As TaskPane_Select
    Public WithEvents Select_CustomTaskPane As Microsoft.Office.Tools.CustomTaskPane

 Private Sub ThisAddIn_Startup() Handles Me.Startup

          oTaskPane_Select = New TaskPane_Select()
            Select_CustomTaskPane = CustomTaskPanes.Add(oTaskPane_Select, "SELECT Elements")
            Select_CustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
terencino earned 500 total points
ID: 38731629
Hi murbro, would the CustomTaskPanes.Remove method work for you? Here is an example (for Word but quite similar) showing the method in action:
How to Create a Word Addin using Visual Studio
Hope that helps
...Terry
0
 

Author Closing Comment

by:murbro
ID: 38732092
Yes. thanks very much
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question