View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Unload all addins in VBA

Sub test()
Dim wkb As Workbook

For Each wkb In Workbooks
If Not wkb Is ThisWorkbook Then
If Not wkb.IsAddin Then wkb.Close
End If
Next
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"arne" wrote in message
...
Your solution just close active workbook. I need to
unload addins in a way that when the user starts using Excel she starts
with
no addins activated, but can choose by herself (or by buildt in code)
which
one to load.
The addins (*.xla files must not be uninstalled)

"Rob van Gelder" skrev i melding
...
I'm reading that you dont want to uninstall addins, just temporarily
close
them for this Excel session?

Sub test()
Dim wkb As Workbook

For Each wkb In Workbooks
If Not wkb Is ThisWorkbook Then wkb.Close
Next
End Sub

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"arne" wrote in message
...
Is there a way to unload all addins every time you open Excel 2000?

(The
users may use addins I do not know the name of , therfore I can not say
which one to unload.)

Like For Each AddIns
If AddIns is loaded then unload

arne