Solved

Excel VB.net Add-in regenerate custom TaskPane

Posted on 2012-12-30
2
551 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 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