View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ozgrid.com ozgrid.com is offline
external usenet poster
 
Posts: 464
Default 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