+ Reply to Thread
Results 1 to 7 of 7

Quick question regarding custom functions...

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Quick question regarding custom functions...

    Hi,

    If you create a public cusotm function, does the original workbook ahve to be open to use this function in other workbooks?

    Thanks

    readered
    Last edited by readered; 09-12-2012 at 09:37 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Quick question regarding custom functions...

    You can store it in your personal.xls file, then it will be available to all workbooks whenever you open Excel.

    Hope this helps.

    Pete

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Quick question regarding custom functions...

    or store it in an add-in but yes the workbook with the code in has to be open
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    08-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Quick question regarding custom functions...

    Is this a file that will be on my computer somewhere, or will I have to create and save it somewhere specifically?

    Thanks

  5. #5
    Registered User
    Join Date
    08-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Quick question regarding custom functions...

    Thanks JP, I suppose i can just open the required workbook in the code then close it again

    Thanks for your help

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Quick question regarding custom functions...

    It's a custom function. It must be installed in such a way as to be accessible to the workbooks where it will be employed.

    1) Install the function specifically into each workbook where it is needed

    PROS - the function travels with the workbooks, if you send one of them to anyone, the function still works

    CONS - macros have to be enabled


    2) Install the function in your Excel's PERSONAL.XLS file

    PROS - macros do not have to be enabled when viewing the workbooks that use the function
    - Function is available on your computer at all times, any workbook can use it

    CONS - you might forget and send the workbook to someone who doesn't have your function installed in their PERSONAL.XLS so when they open the workbook they will see #NAME errors.



    NOTE: If you opt for #1, you MUST install the function into each workbook. Just opening a workbook that has that function will NOT allow it to work in other opened workbooks. Only PERSONAL.XLS does that.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  7. #7
    Registered User
    Join Date
    08-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Quick question regarding custom functions...

    thanks for all the help,

    What i think I might do is create a txt file with all my fucntions, then copy them into the required workbook, as I will have to send them to other people

    Many thanks

    readered

+ 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