Results 1 to 4 of 4

Thread: Updating Add-In via .NET

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    31

    Updating Add-In via .NET

    When I update my add-in (I currently do this manually) I replace the old add-in file with the new one but when I do this excel doesn't recognize the new file. So I have to delete the old one go into excel and try to manually add the old add-in, which was deleted, tell it to get rid of the reference to the old one then I can put in the new add-in.

    Is there a way to get around this? I've read Professional Excel Development and Excel 2010: Power Programming with VBA but neither address this problem and I haven't found any solutions online. What am I missing?

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Updating Add-In via .NET

    why not just edit the existing addin?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Updating Add-In via .NET

    I replace the old add-in file with the new one
    How and where do you replace it?

    Sid
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    31

    Re: Updating Add-In via .NET

    What I normally do is I copy over the new file from my XP Office 2003 computer and paste it into the folder where I have the add-in file (not the add-ins folder but a separate folder near the excel file that I use it on). I then start the program using VB.NET that uses the following code:

    Code:
    If Not ContainsAddIn(oXl, "MyAddIn") Then
                            oAddin = oXl.AddIns.Add(gsMainAddInFullName, True)
                        End If
                        oAddin.Installed = True
    Where ContainsAddIn is a function that checks if the add-in is already installed already (before I would always just use oXl.AddIns.Add always so the problem existed before I added this code).

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width