Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Uninstall Addin

Hi,

I want to uninstall my addin, but this does not work

AddIns("Libra.xla").Installed = False

I know you can loop through all addins, but that is too time-consuming, so,
is it possible to uninstall one specific addin?

Thanks
Jos Vens


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Uninstall Addin


there's no faster way than looping thru the addins.
UNLESS your addin is unloading itself so you're sure it's loaded.

Sub AddinDeactivate1()
Dim wkb As Workbook, ai As AddIn, sIndex As String
On Error Resume Next
Set wkb = Workbooks("libra.xla")
If Not wkb Is Nothing Then
If wkb.Title < vbNullString Then
sIndex = wkb.Title
Else
sIndex = wkb.Name
If InStr(sIndex, ".") 0 Then
sIndex = Left$(sIndex, InStr(sIndex, ".") - 1)
End If
End If
Else
Beep
End If
Set ai = AddIns(sIndex)
If Not ai Is Nothing Then
If ai.Installed Then ai.Installed = False
End If

End Sub

Sub AddinDeactivate2()
Dim ai As AddIn
On Error Resume Next
For Each ai In AddIns
If ai.Name = "libra.xla" Then
If ai.Installed Then ai.Installed = False
Exit For
End If
Next
End Sub


hth


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jos Vens wrote :

Hi,

I want to uninstall my addin, but this does not work

AddIns("Libra.xla").Installed = False

I know you can loop through all addins, but that is too
time-consuming, so, is it possible to uninstall one specific addin?

Thanks
Jos Vens

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Uninstall Addin

That's a pitty, because on slow networks, it costs a lot of time for the
loop (sometimes more than 3 minutes!).

"keepITcool" schreef in bericht
.com...

there's no faster way than looping thru the addins.
UNLESS your addin is unloading itself so you're sure it's loaded.

Sub AddinDeactivate1()
Dim wkb As Workbook, ai As AddIn, sIndex As String
On Error Resume Next
Set wkb = Workbooks("libra.xla")
If Not wkb Is Nothing Then
If wkb.Title < vbNullString Then
sIndex = wkb.Title
Else
sIndex = wkb.Name
If InStr(sIndex, ".") 0 Then
sIndex = Left$(sIndex, InStr(sIndex, ".") - 1)
End If
End If
Else
Beep
End If
Set ai = AddIns(sIndex)
If Not ai Is Nothing Then
If ai.Installed Then ai.Installed = False
End If

End Sub

Sub AddinDeactivate2()
Dim ai As AddIn
On Error Resume Next
For Each ai In AddIns
If ai.Name = "libra.xla" Then
If ai.Installed Then ai.Installed = False
Exit For
End If
Next
End Sub


hth


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jos Vens wrote :

Hi,

I want to uninstall my addin, but this does not work

AddIns("Libra.xla").Installed = False

I know you can loop through all addins, but that is too
time-consuming, so, is it possible to uninstall one specific addin?

Thanks
Jos Vens



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
uninstall excel 2007 The Whale Excel Discussion (Misc queries) 1 January 25th 07 07:15 PM
Excel: How to uninstall a COM add-in built with VB .NET Howard Kaikow Excel Programming 2 May 11th 04 10:31 PM
Help with Uninstall Event Clinton[_2_] Excel Programming 3 April 18th 04 11:00 AM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
How to uninstall XP PIAs Carol CXie Excel Programming 0 October 24th 03 11:28 PM


All times are GMT +1. The time now is 10:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"