Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
Hello,
The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
Uncheck the add-in from the add-ins dialog, move or delete the add-in from
its folder. Go back to Excel add-ins and check the add-in and say YES to removing the add-in from the list. -- Regards Dave Hawley www.ozgrid.com "CB" wrote in message u... Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
Thanks! Dave.
You're suggestions are correct but still requires a few simple user steps to completley remove an Add-in from the Available Add-in's List. I'm looking for a coded (scripted) way to do the full removal as the code below only deactivates the Addin and then the user need to follow the manaul steps. All ideas welcome. Charlie.B ozgrid.com wrote: Uncheck the add-in from the add-ins dialog, move or delete the add-in from its folder. Go back to Excel add-ins and check the add-in and say YES to removing the add-in from the list. CB wrote: Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
CB brought next idea :
Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing This is a complex process, but can be done. You'll need to write code to remove the addin entries in the Registry. There are two keys that must be edited: 'Add-in Manager' and 'Options'. You'll also need several declares and constants for using the necessary RegistryAPI functions, and two separate procedures to remove the Registry entries. These two procedures will be called from a Main() sub that first checks the Registry for each version of Excel that may be in use, to determine if the addin has an entry. This is necessary because each Excel version has its own Registry key, and you must edit the correct key. Thus, you may have to check several keys depending on the earliest version of Excel the addin has been installed to. If you're not up for messing around in the Registry, post the filename of your addin and your email address if you want me to send you a VB6.exe that will do this for you. Garry |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
Hi Gary,
Thank you for your offer of assistance (Appreciated!). I had a feeling there was no simple answer but thought I'd ask. After I uninstall the Addin I'll write some nested IF lines (for different Office versions) to remove from the Add In Manager to complete the removal. I very much apprciate your offer of help. Kind Regards, Charlie. GS wrote: CB brought next idea : Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing This is a complex process, but can be done. You'll need to write code to remove the addin entries in the Registry. There are two keys that must be edited: 'Add-in Manager' and 'Options'. You'll also need several declares and constants for using the necessary RegistryAPI functions, and two separate procedures to remove the Registry entries. These two procedures will be called from a Main() sub that first checks the Registry for each version of Excel that may be in use, to determine if the addin has an entry. This is necessary because each Excel version has its own Registry key, and you must edit the correct key. Thus, you may have to check several keys depending on the earliest version of Excel the addin has been installed to. If you're not up for messing around in the Registry, post the filename of your addin and your email address if you want me to send you a VB6.exe that will do this for you. Garry |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
It depends where the addin is. If it's in one of the default addin folders
simply remove it (after uninstalling it if not already). Application.UserLibraryPath and for backwards compatibility ..Application.LibraryPath If it's not in a default folder it will no longer appear in the addin's list, however it will still remain in the addins collection and in the registry (as GS mentioned). First uninstall the addin, either manually or programmatically. Close *all* instances of Excel. Delete the relevant entry in this key - HKEY_CURRENT_USER\Software\Microsoft\Office\X.0\Ex cel\Add-in Manager where X is the Excel version, eg 11 for 2003 Regards, Peter T "CB" wrote in message u... Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
CB was thinking very hard :
Hi Gary, Thank you for your offer of assistance (Appreciated!). I had a feeling there was no simple answer but thought I'd ask. After I uninstall the Addin I'll write some nested IF lines (for different Office versions) to remove from the Add In Manager to complete the removal. I very much apprciate your offer of help. Kind Regards, Charlie. Like I said, it's complex and so not going to be as easy as writing some nested IF constructs. To access the Registry keys you need to edit requires using several RegistryAPI functions and their relative constants, and you must ensure you pass their parameters correctly. There are no built-in VB/VBA functions to do this (i.e.: DeleteSetting will not work because it won't access the required part of the Registry). I use my solution for clients who want an easy way to remove my XLA addins when no longer used/wanted or the licenses have expired. XLA type addins do not provide a way of 'auto-uninstalling' via Add/Remove Programs as do COMAddins. I got this utility from Rob Bovey (it's author), who made it for his own use. It's specifically designed to only require the addin's filename, then compile it to a VB6.EXE and send off to the client. Because he gave it to me for my own personal use, I think you will understand why I won't give out the code. (The original VBP contains 4 modules) I also use it as a development tool for retesting initial startup behavior for XLA type projects. (I keep refering to anything that is package in a workbook as a 'XLA type' project, whether or not the "xla" file extension is used) Peter T gave you one of the keys you need to edit. There is also the "Options" key to check because if the addin was not uninstalled or unchecked in the Addin Manager dialog it's entry will be found there. I realize Peter suggests uninstalling/unchecking it first so you only have to edit the one Registry key, but you may find it less work and more convenient to do it all in one place since you MUST edit the Registry anyway. The utility I use edits both keys and so requires doing nothing on the part of my clients. Best of luck in your effort! Garry |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Excel addin completely
Many Thanks to Dave, Gary & Peter!
- I appreciate your time given to replying to my question. Kind Regards from Australia! Charlie.B CB wrote: Hello, The sample code I found below uninstalls an Excel add-in but leaves it in the list of available Add-ins. Im looking for a script to "completely" remove the Excel addin (tidy is nice!). I need to do this across a range of users with Office 2003 & 2007 so I was wanting to reference Excel objects rather than Registry Keys which vary depending on the Office Version. Does anyone know if there is code to "completely" remove an Add-in? Kind Regards Charlie.B Dim oXL Dim crAddin on error resume next Set oXL = CreateObject("Excel.Application") for i = 1 to oXL.Addins.Count Set crAddin = oXL.Addins.item(i) If crAddin.Name = "xpaddin.xla" then crAddin.Installed = False End If Next oXL.Quit Set oXL = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to completely remove duplicate rows in vba | Excel Programming | |||
Remove Addin | Excel Discussion (Misc queries) | |||
How can I remove the Excel COM addin from the Excel program? | Excel Programming | |||
how to completely remove an add-in? | Excel Programming | |||
Remove Excel AddIn from AddIn List !! Help | Excel Programming |