Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

remove Add-In?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 24 May 2008 03:52 GMT
I have an Add-In that has some code in it to connect to an Oracle database
and retrieve data... that part works fine.

But, at theend of processing, I'd like to not only uncheck it in the AddIns
list, but also remove it from the list altogether.

Is there a way that I can do that in code?

Thanks,
Mark
mark - 24 May 2008 04:39 GMT
from some web searches, it seems what I wanted to do isn't possible without
editing the registry...

in some cases, editing the registry will be denied.

perhaps just un-installing it (unchecking the checkbox in the Add-In List is
good enough)

but, if there are better suggestions, I'm still listening.

thanks.

> I have an Add-In that has some code in it to connect to an Oracle database
> and retrieve data... that part works fine.
[quoted text clipped - 6 lines]
> Thanks,
> Mark
john - 24 May 2008 10:33 GMT
Mark,
If you delete the AddIn then you can use this code I found on web sometime
ago (author name unknown so my apologies to him / her) to remove it from the
list.
May not be complete answer to you problem but hopefully give you some ideas.

Sub InvalidAddIns()
   Dim lCount As Long
   Dim sGoUpandDown As String
   'Turn display alerts off so user is not prompted to remove Addin from list
   With Application
       .DisplayAlerts = False
       Do
           'Get Count of all AddIns
           lCount = Application.AddIns.Count

           'Create string for SendKeys that will move up & down AddIn
Manager List
           'Any invalid AddIn listed will be removed
           sGoUpandDown = "{Up " & lCount & "}{DOWN " & lCount & "}"

           Application.SendKeys sGoUpandDown & "~", False
           Application.Dialogs(xlDialogAddinManager).Show

           'Continue process until all invalid AddIns are removed since
           'this code can only remove one at a time.
       Loop While lCount <> Application.AddIns.Count
       .DisplayAlerts = True
   End With
End Sub

Signature

jb

> I have an Add-In that has some code in it to connect to an Oracle database
> and retrieve data... that part works fine.
[quoted text clipped - 6 lines]
> Thanks,
> Mark
mark - 24 May 2008 19:19 GMT
thanks, John.

I'll give it a look.

I notice the notes are saying "invalid add-ins"... I'm not sure whether this
will be considered an invalide Add-In, or not... since the Add-In will still
exist on the network where it's home is.

One thing I was thinking was that I could copy the Add-In to the c:\ drive,
delete it from there at the end of the process, and then the Add-In would
come up invalid, to be removed from the list.

But, I don't think I would want to do that.. probably better to just leave
the Add-IN available in the list, if I have to... the point was that we
wanted to be able to use the features in the Add-In, upon my program's
command, but not really distribute it.

I was reading on Chip Pearson's site about Automation Add-Ins that
distribute as DLL from VB6, not really distributing the code, but just a
compiled version of it... but that sounded like I'd get into DLL distribution
issues, too...

Thanks for your pointer.
Mark

> Mark,
> If you delete the AddIn then you can use this code I found on web sometime
[quoted text clipped - 37 lines]
> > Thanks,
> > Mark
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.