Solved

VB.net Excel add-in re-enable programatically

Posted on 2015-01-04
3
447 Views
Last Modified: 2015-01-05
Hi

Is it possible to re-enable a VB.net Excel add-in that has been disabled?

Thanks
0
Comment
Question by:murbro
3 Comments
 
LVL 4

Assisted Solution

by:jimtech
jimtech earned 250 total points
Comment Utility
Not sure if this would work for you but you can try this:

Automation Add-Ins are loaded in the same way as normal .xla Add-Ins , but using the ProgID instead of the file name, as in the following code:

Sub installAutomationAddIn()
    AddIns.Add Filename:="Excel2007ProgRef.Simple"
    AddIns("Excel2007ProgRef.Simple").Installed = True
End Sub

If you are creating an installation routinefor your Add-In, you may want to write directly to the registry in order to set the Automation Add-In as installed. To do so, you need to create the following registry entry (Which will already exist if you've used the above code).

(In the Registry Key:)
HKEY_CURRENT_USER\SOftware\Microsoft\Office\12.0\Excel\Options

(Create the string value:)
Name = the first unused item in the series: Open, Open1, Open2, etc.
Value = /A "Excel2007ProgRef.Simple"
0
 
LVL 9

Accepted Solution

by:
Christopher Jay Wolff earned 250 total points
Comment Utility
Probably need to know what version of Excel as things are moving to XML.. There is a thread here below

http://answers.microsoft.com/en-us/office/forum/office_2007-customize/remove-an-excel-2007-addin-programatically-in-vba/2fffffdf-dfc9-4723-8924-66a08e4b62ac

that discusses testing status and turning add-in on and off with VB.  Older versions of Excel you could reset the registry keys, as described here

http://support.microsoft.com/kb/291392

Please let us know if this applies to you or if not, what version you have.
0
 

Author Closing Comment

by:murbro
Comment Utility
Thanks very much
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now