Google Groups Home
Help | Sign in
Remove AddIn from list
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Expand all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Richard Reye  
View profile
 More options May 2 2006, 10:15 am
Newsgroups: microsoft.public.excel.programming
From: Richard Reye <richardr...@NOSPAMhotmail.com>
Date: Mon, 1 May 2006 17:15:02 -0700
Local: Tues, May 2 2006 10:15 am
Subject: Remove AddIn from list
I was looking for some code to remove an AddIn from the AddIn Manager List
after it has been uninstalled and killed (or AddIn moved to another
location). I noticed that on searching this newsgroup that I'm not the only
one after this sort of automation.

I managed to come up with this code after looking at other attempts (see
http://tinyurl.com/nxxmt for my main inspiration) which should remove EVERY
AddIn that is no longer valid. I hope it is helpful.

- - - - - - - -

Sub ClearAddinRegister()

Dim MyCount As Long
Dim GoUpandDown As String

'Turn display alerts off so user is not prompted to remove Addin from list
Application.DisplayAlerts = False

Do
    'Get Count of all AddIns
    MyCount = Application.AddIns.count

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

    Application.SendKeys GoUpandDown & "~", 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 MyCount <> Application.AddIns.count

Application.DisplayAlerts = True

End Sub

- - - - - - - -

Cheers!

Richard Reye

"Never argue with an idiot. They'll bring you down to their level then beat
you with experience" - someone


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google