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
Solved

VB.net Excel add-in re-enable programatically

Posted on 2015-01-04
3
500 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
ID: 40530429
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
ID: 40530435
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
ID: 40531389
Thanks very much
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

791 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