+ Reply to Thread
Results 1 to 6 of 6

Thread: Copying UDFs from another worksheet?

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    13

    Copying UDFs from another worksheet?

    I have several User Defined Functions in workbooks someone sent me.
    Can I copy those UDFs into my Function Library?
    And can I create a new category?
    For example, "Astronomy Functions" in the Function Library.

    I can "link" (I guess you might call it that) by keeping two workbooks open and copying and pasting functions from one sheet to the other. But that requires both books to be open. Once I close the one with the source function, the functions disappear in the other sheet.

    I tried copying one book into another and that didn't work, either.

    Thanks, Scott
    Last edited by Scott S.; 11-24-2011 at 07:57 PM.

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Copying UDFs from another worksheet?

    You could just copy and paste the code. Or export the module from the source and import it to the target workbook.


    Regards

  3. #3
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Copying UDFs from another worksheet?

    OK, so it's possible.
    I'm no excel genius, so, could someone explain how I might get started on doing that?

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Copying UDFs from another worksheet?

    Open both workbooks. Press Alt-F11 to open the VBE.

    Navigate to the module with the UDFs in the source workbook.

    Select and copy the code.

    Navigate to the equivalent module in the target workbook.

    Paste the UDF code.

    Close the workbook(s).

    Done.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Copying UDFs from another worksheet?

    Cool.

    Thank you very much.

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,238

    Re: Copying UDFs from another worksheet?

    You're welcome. Thanks for the rep.

+ 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.2.0