+ Reply to Thread
Results 1 to 2 of 2

User Defined Function (UDF) in a shared workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    06-08-2007
    Posts
    1

    User Defined Function (UDF) in a shared workbook

    I have created a UDF and an Excel Add-in which contains this function. I want to call this function on a spreadsheet that can be viewed by anyone in my group on our network. The problem is that even if others have the add-in installed, Excel changes the function call so that it includes the full path name of the Excel Add-in. This means that Excel now looks for the add-in and function on my computer instead of looking at the add-ins installed on the other computer.

    For example I want to call a function called rkdays()

    If I write in cell C4 "=rkdays(...)" the function works fine. When I save it and someone else opens it they see in cell C4
    "'C:\Documents and Setting\....\rk.xla'!rkdays(...)"

    The path above is for my computer however and so it is simply not found. If you delete the path the function works just fine. I would like Excel not to write that path in the first place.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,373
    I've run into this issue some, too. From what I can tell, even though it isn't immediately visible, the path is an inherent part of the installing the add-in, and, thus, an inherent part of the function call.

    From my limited experience, you can make it work if each computer puts the add-in in the same "relative" position on their drives. So if your spreadsheets are in C:\my documents\exceldocs and your add-ins are in C:\my documents\exceladdins, you can get it to work if the other users adopt the same file structure, even if they are using different drives (D:\...). Of course, this requires that you get with those who need to share these files and decide how you want to structure it.

    A quick fix is to use the Edit->Links dialog, then select the add-in, then use the "change source" command. However, when the other users save the file, this change will be incorporated into the saved file, and you'll need to repeat the process when you open the changed file on your computer.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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