Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loading/Unloading COM addins from code (Excel 2000/SR1)

    How does one load and unload COM addins from code? What I am trying to do is I have four COM addins that are set to load on startup and two of them create menu items. From one of the menu items a COM addin will unload or load the other three COM addins.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Loading/Unloading COM addins from code (Excel 2000/SR1)

    I never use COM addins so I am not sure.

    From a search of the lounge I found <post#=207469>post 207469</post#> which I would have "guessed" seemed to answer your question

    But then this was a reponse to a "similar question" you asked 2.5 years in How does one load/unload a COM AddIn via code (Excel 2000/Excel 2002) which makes me think it might not be the answer...

    Steve

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loading/Unloading COM addins from code (Excel 2000/SR1)

    From Excel XP VBA Help:

    Connect Property
    See Also Applies To Example Specifics
    Returns or sets the state of the connection for the specified COMAddIn object. Read/write Boolean.

    Remarks
    The Connect property returns True if the add-in is active; it returns False if the add-in is inactive. An active add-in is registered and connected; an inactive add-in is registered but not currently connected.

    Example
    The following example displays a message box that indicates whether COM add-in one is registered and currently connected.

    If Application.COMAddIns(1).Connect Then
    MsgBox "The add-in is connected."
    Else
    MsgBox "The add-in is not connected."
    End If
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loading/Unloading COM addins from code (Excel 2000/SR1)

    Duhhhh I thought I had posted this same type of question before but I couldn't find it with a search and the applications I have here do not load or unload COM addins via code. I guess there was once a requirement to load and unload COM addins via code and then the requirement changed. Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •