Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Addin (2003) Done in VS 2008

Status
Not open for further replies.

RonRepp

Technical User
Feb 25, 2005
1,031
US
Hi all:

Note: I tried posting this in the .Net forum, but was not getting any responses. Thus, I've come to the experts.

I created an Excel Addin with VB.Net 2008 that works fine. However, even when the project is closed, if I open Excel, it fires the addin.

I see it in Addins>Automation. How do I get rid of it?

Code:
Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
        ' Start of VSTO generated code

        Me.Application = CType(Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy.Wrap(GetType(Excel.Application), Me.Application), Excel.Application)
        
        ' End of VSTO generated code

    End Sub

    Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
        For Each cb In Me.Application.CommandBars
            If cb.Name = "Ron" Then
                cb.delete()
            End If
        Next cb
        
        Me.Application = Nothing

    End Sub
Thanks,

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.

My newest novel: Wooden Warriors
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top