Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Prevent loading Add-in ...

Hi All,

Is it possible to prevent loading of another Add-in when my workbook is open?

Cheers Sige
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Prevent loading Add-in ...

Sige,

The add-ins are loaded when Excel starts up. What exactly do you mean by
'... loading of another Add-in when my workbook is open ..? Is the workbook
loading the addin through code or something?

--

HTH

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


"SIGE" wrote in message
om...
Hi All,

Is it possible to prevent loading of another Add-in when my workbook is

open?

Cheers Sige



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Prevent loading Add-in ...

Hi Sige,

If you mean prevent someone using Tools \ AddIns to install an AddIN then
yes.

- Create a class module called cslApp
- Have this declaration at the top:
Public WithEvents AppEvents As Excel.Application
- In a normal module decla
Public myEvents As New clsApp
- When you start your own AddIn load
Set myEvents.AppEvents = Excel.Application
-Place this in your clsApp module

Private Sub AppEvents_WorkbookAddinInstall(ByVal Wb As Workbook)
'enter you code here
End Sub

This will fire when someone tries to install an AddIn manually. You can then
close the workbook they installed. Although whether you'll make any friends
that way... :-)

HTH,
Gareth


"SIGE" wrote in message
om...
Hi All,

Is it possible to prevent loading of another Add-in when my workbook is

open?

Cheers Sige



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prevent loading Add-in ...


Hi Bob,


My add-ins are loaded at startup of Excel!
(or maybe not ... see my previous threat (loading/unloading Add-in
mystery = Personally I think it is a rather complicated "Command Line
Switch" issue ...maybe something else???)

My workbook is loading the Add-ins I need for this particular workbook
through code.
My question was on how to prevent loading ... other Add-ins (custom
and/or MS standard Add-ins) which this workbook does not need.

HTH, Sige
(Can only access the Newsgroup through the Internet so my response(s)
may lag a bit .. sorry for that!)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Prevent loading Add-in ...


Hi Gareth,

Will try out your solution. Not very familiar with Class Modules though.

The friends ...yeah... I will make it up with them later!
:o)

"NOSPAM" to be removed for direct mailing...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Prevent loading Add-in ...

Hi Gareth,

I managed to make no friends ... ;o)
Can I create ennemies? :o)

=I still have the possibility to load an Add-in, i.e. I can double
click an xla ... and run the respective xla. Ok, you can't set it up
anymore in Tool=Add-in ...

But I would prefer not to "load" (activate) ANY Add-ins anymore (to a
restricted nr of users btw) besides the ones I am "loading"
(activating).

Is this possible to trigger?

Cheers Sige

"NOSPAM" to be removed for direct mailing...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Prevent loading Add-in ...

Yes... and no.

If you were to place in your AddIn's Workbook Open Event (or maybe better,
in a procedure that remembers, the first time it was run) a routine that
does the following:
'--------------------
Private myAddins() as string

Sub UninstallAllAddins()

Dim AI As AddIn
Dim i as integer

Redim myAddins(0)
For Each AI In AddIns
'you might need to check it's not your own
'haven't tried:
' if not thisworkbook.name = AI.name
'for example
If AI.Installed Then
myaddins(i ) = AI.FullName
i = i +1
redim preserve myaddins(i)
AI.Installed = False
End If
Next AI
End Sub
'------------
Then, when your workbook closes reinstall everything you
uninstalled.'---------
Sub ReinstallAddins
do while not myaddins(i) = ""
Application.AddIns.Add Filename:=myaddins(i), copyfile:=False
i = i +1
Loop
Application.AddIns.Add Filename:=mypath, copyfile:=False
End Sub

But I have to say again... this won't make you many friends!

HTH,
Gareth


"SIGE" wrote in message
...
Hi Gareth,

I managed to make no friends ... ;o)
Can I create ennemies? :o)

=I still have the possibility to load an Add-in, i.e. I can double
click an xla ... and run the respective xla. Ok, you can't set it up
anymore in Tool=Add-in ...

But I would prefer not to "load" (activate) ANY Add-ins anymore (to a
restricted nr of users btw) besides the ones I am "loading"
(activating).

Is this possible to trigger?

Cheers Sige

"NOSPAM" to be removed for direct mailing...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Loading... K Excel Discussion (Misc queries) 1 October 7th 07 09:37 PM
loading mallahd Excel Discussion (Misc queries) 2 May 25th 07 07:59 PM
HOW CAN I PREVENT EXCEL FILES FROM BEING DELETED OR PREVENT TRASH ROB Excel Discussion (Misc queries) 2 April 2nd 07 01:13 PM
Prevent "Getting Started" from loading up sfrancoe Setting up and Configuration of Excel 1 March 28th 06 08:07 PM


All times are GMT +1. The time now is 07:36 PM.

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

About Us

"It's about Microsoft Excel"