Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Unload all addins in VBA

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Unload all addins in VBA

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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Unload all addins in VBA

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







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Unload all addins in VBA

Arne,

This will uninstall all addins, but I don't recommend it, you might be
uninstalling things that the workbooks depend upon on.

For Each add_in In Application.AddIns
If add_in.Installed Then add_in.Installed = False
Next addin

The add-ins will still be in the add-ins list, and can be re-installed.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Unload all addins in VBA

Hi Arne,

why not use

Unload Application.AddIns

? because the addins collection stands for every possible
addin, it should work...

Best regards

Markus

-----Original 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



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Unload all addins in VBA

This works! Thanks BOB.

Working code--


Sub Auto_open()
'removeall_addins' Thanks to Bob Phillips microsoft.public.excel.programming
'you can still install the addins, the addins do not
'leave your PC!
For Each Add_In In Application.AddIns
If Add_In.Installed Then Add_In.Installed = False
Next Add_In

End Sub

Sub addall_addins()
' install all the addins! But you do not need to do that......
For Each Add_In In Application.AddIns
If Add_In.Installed = False Then Add_In.Installed = True
Next Add_In

End Sub


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Unload all addins in VBA

It does not work; I get runtime error 361..
arne
'''''

"Markus Scheible" skrev i melding
...
Hi Arne,

why not use

Unload Application.AddIns

? because the addins collection stands for every possible
addin, it should work...

Best regards

Markus

-----Original 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



.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Unload all addins in VBA

Arne...

You're not heeding Bob's warning.
Uninstalling ALL addins may not be appreciated by your users
(thay may expect to have "Analysis Toolpak" loaded at all times)

The second one however is FAR worse...
I have over 60 addins listed in my addins list.
I would NOT be happy if your little procedure would start loading them
all.. <G

If you want to temporarily unload addins you MUST store the
previously loaded addins in a module level collection.

Then when your procedure is done you should restore THOSE addins





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


arne wrote :

This works! Thanks BOB.

Working code--


Sub Auto_open()
'removeall_addins' Thanks to Bob Phillips
microsoft.public.excel.programming 'you can still install the addins,
the addins do not 'leave your PC!
For Each Add_In In Application.AddIns
If Add_In.Installed Then Add_In.Installed = False
Next Add_In

End Sub

Sub addall_addins()
' install all the addins! But you do not need to do that......
For Each Add_In In Application.AddIns
If Add_In.Installed = False Then Add_In.Installed = True
Next Add_In

End Sub

  #9   Report Post  
Posted to microsoft.public.excel.programming
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









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
Excel Won't Unload... Steven8R Excel Programming 3 October 20th 04 04:42 AM
Unload the form on esc key Papou Excel Programming 0 August 10th 04 05:15 PM
XLA Unload problem Von Shean Excel Programming 1 January 10th 04 08:24 PM
Unload Me Chip Pearson Excel Programming 0 September 5th 03 12:56 AM
Unload from Memory Charles Williams Excel Programming 0 July 18th 03 08:42 AM


All times are GMT +1. The time now is 04:58 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"