+ Reply to Thread
Results 1 to 8 of 8

Excel trying to use wrong file location for custom add in

  1. #1
    Registered User
    Join Date
    03-31-2017
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4

    Excel trying to use wrong file location for custom add in

    I'm having an issue with an add in file (.xlam) that excel seems unable to find. I have an add-in in a file "C:\my_add_in_dir\my_add_in.xlam" which I have installed on several different machines in the same location. I have a workbook, which on workbook open calls "Addins.Add("C:\my_add_in_dir\my_add_in.xlam")" This code runs fine and when I open up File->Options->Add-Ins I see the add-in under Active Application Add-Ins in the correct file location. The problem occurs when I try to make a call to Application.Run("my_add_in.xlam!Some_Macro"), I get a run time error 1004 saying "Sorry we couldn't find C:\Users\user_name\Documents\my_add_in.xlam". It seems as if somehow excel thinks this add-in is located in a completely different file location. Also this error only occurs on one of the several machines that I have this add-in installed in.

    I have tried the usual fix of removing the add-in file from its directory, opening excel, deleting it from the add-in dialog box, then re-adding it. Unfortunately this doesn't solve the issue.

    If anyone has any guidance it would be greatly appreciated.

    Thanks

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Excel trying to use wrong file location for custom add in

    Perhaps
    https://answers.microsoft.com/en-us/...5-722d7ebe4a67
    Alf

  3. #3
    Registered User
    Join Date
    03-31-2017
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4

    Re: Excel trying to use wrong file location for custom add in

    @Alf, thanks for the link, this particular add-in in question doesn't use a toolbar. The error comes from calling an addin function inside VBA, it's almost like Excel (or VBA) doesn't know where the addin file is located even though its been properly installed. The error message I get says that it is looking for the addin file in "C:\Users\user_name\Documents\" which happens to be the default file location from the settings in File-> Options -> Save.

  4. #4
    Registered User
    Join Date
    07-14-2013
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    97

    Re: Excel trying to use wrong file location for custom add in

    Try going to your add-in in your documents folder and right click on the add-in. Then click on properties, and see if you have a box you can check that says unblock. Click in the checkbox to unblock the add-in. This is what I had to do with my add-ins after MS made a security change in July 2016.

  5. #5
    Registered User
    Join Date
    03-31-2017
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4

    Re: Excel trying to use wrong file location for custom add in

    @XL&ME, thanks for the tip. I did have a box that said "Unblock" in the file properties window, I clicked it and it didn't change the status of the error message though. When you were experiencing this issue did it occur each time a call was made to the add-in or was the error more sporadic? I'm able to put a temporary fix on the issue by re-ticking the add-in from the add-in dialog box, but in a week or two the error will resurface.

    Thanks

  6. #6
    Registered User
    Join Date
    07-14-2013
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    97

    Re: Excel trying to use wrong file location for custom add in

    When I clicked on Unblock, I then closed the window and ran the add-in. Haven't had to Unblock the add-in once I did it the first time, unless I had to re-install a add-in for some reason.

  7. #7
    Registered User
    Join Date
    03-31-2017
    Location
    New York
    MS-Off Ver
    2013
    Posts
    4
    Quote Originally Posted by XL&ME View Post
    When I clicked on Unblock, I then closed the window and ran the add-in. Haven't had to Unblock the add-in once I did it the first time, unless I had to re-install a add-in for some reason.
    Initially when you were getting the error, before implementing the unblock fix, was the error consistently occuring or did it only pop up occasionally?

  8. #8
    Registered User
    Join Date
    07-14-2013
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    97

    Re: Excel trying to use wrong file location for custom add in

    The error occurred continuously until I was able to successfully Unblocked the add-in. Had one add-in that I installed and uninstalled many times and tried various things before I could get it to work properly. In the end, after installing and uninstalling it still took several time to successfully Unblock the add-in.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] After changing file location or renaming,custom ribbon not working
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2016, 08:31 PM
  2. Mac excel 2016, vba copy file from one location to sandbox location
    By sujithy007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2016, 12:01 PM
  3. [SOLVED] Macro to Save Excel File to a SharePoint location and then e-mail that location in Outlook
    By NickyHavey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2016, 09:27 AM
  4. Save a Macro Enabled Template to a custom location with a custom file name.
    By andcha in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-24-2013, 11:46 AM
  5. Excel links to wrong network location
    By craigdabbs in forum Excel General
    Replies: 1
    Last Post: 12-26-2012, 04:35 AM
  6. Location of custom buttons in Excel 2007
    By mliungman in forum Excel General
    Replies: 0
    Last Post: 08-16-2007, 05:15 PM
  7. Replies: 7
    Last Post: 04-01-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1