+ Reply to Thread
Results 1 to 3 of 3

Trying to add User Defined Function to the personal workbook

  1. #1
    Registered User
    Join Date
    03-04-2021
    Location
    Louisville, KY
    MS-Off Ver
    2016
    Posts
    6

    Trying to add User Defined Function to the personal workbook

    I'm trying to add a user defined formula to my personal workbook so I can use it on any workbook/worksheet. I have already defined my formula, but I can only seem to add/use it in to individual worksheets. If I have to add the formula to every worksheet, it will lose its value. Hopefully my request is possible.

    Thanks!

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,831

    Re: Trying to add User Defined Function to the personal workbook

    As a late adopter still using Excel 2007, I prefer to put UDFs that I intend to use in worksheet formulas in any sheet into an add-in file. From an add-in, I can call them just like any built in function =MYUDF(arguments) or =25*MYUDF(arguments). I learned early on that, if I store a UDF in a file like Personal.xlsx, then I need to preface the function call with the workbook name =Personal.xlsx!MYUDF(arguments) [I think that would be the right syntax -- haven't done it that way in a long time]. This describes the process of creating an add-in in 2016 (basically the same as it has been since at least 2002: https://www.dummies.com/software/mic...k-file-in-vba/ ). Once created, you can add the add-in to Excel using the File -> Add-ins -> Manage add-ins dialog: https://support.microsoft.com/en-us/...8-403625a0b460

    I see indications that MSFT is trying to move away from VBA and these old style add-ins. If you are a forward looking type that wants to develop UDFs that will be usable in future versions of Excel without relying on MSFT maintaining support for "legacy" approaches, it might be worth looking into the new development/extension/add-in models and whether they are compatible with your 2016 version or not and so on.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    03-04-2021
    Location
    Louisville, KY
    MS-Off Ver
    2016
    Posts
    6

    Re: Trying to add User Defined Function to the personal workbook

    Thanks for the help! I'm honestly just a beginner trying to understand the simple side of VBA let alone other add-ins, usage. I got my function into an add in, and it now works.

+ 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. User-defined type not defined when copying macro from one workbook to another
    By Mogles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2018, 08:08 AM
  2. Replies: 4
    Last Post: 01-16-2013, 05:40 PM
  3. Saving a user defined function to workbook
    By Oilandgasmonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2012, 02:48 PM
  4. Function or Sub Not Defined Error in Personal.xls Macro
    By JohnnyBGood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2007, 08:32 AM
  5. User Defined Function (UDF) in a shared workbook
    By arizenn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2007, 11:19 AM
  6. Replies: 2
    Last Post: 05-11-2006, 11:35 AM
  7. Using a user-defined function from the Personal workbook
    By mworth01 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-04-2006, 09:20 AM

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