+ Reply to Thread
Results 1 to 7 of 7

Public Function Not Showing Up in Spreadsheet

  1. #1
    Registered User
    Join Date
    09-08-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    4

    Public Function Not Showing Up in Spreadsheet

    Hi all,

    I am pretty new to VBA and am having a problem that is driving me crazy with a public function that I tried to create.

    I have a spreadsheet that has several custom public functions (some created by me, some created by other authors). The problem that I am having is that one of the public functions is not showing up when I start to type it in the spreadsheet (i.e., it is not showing up like =sum, or =product are). All the other functions that were created are showing up fine.

    The other weird thing about this though, is that I also made another function that references the "missing" function in the VBA. This new function works fine, and seems to be using the "missing" function fine as well.

    Is there something that I am missing? I feel like there must be a simple solution to this problem. Below is the code for the "missing" function.

    Please Login or Register  to view this content.
    Thanks for any help and let me know if you need anymore information.
    Last edited by PJ11; 11-17-2011 at 06:05 PM.

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Public Function Not Showing Up in Spreadsheet

    Is it in a worksheet or ThisWorkbook module? If so, move it to its own module, or into the module containing the other functions.

  3. #3
    Registered User
    Join Date
    09-08-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Public Function Not Showing Up in Spreadsheet

    It is located in a module that contains other public functions that work fine (Including the one that references it).

  4. #4
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Public Function Not Showing Up in Spreadsheet

    Is the function/sub directly above it ended appropriately? When you go to "Debug" -> "Compile Project" in the VBE, do you get any errors?

  5. #5
    Registered User
    Join Date
    09-08-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Public Function Not Showing Up in Spreadsheet

    No errors in the code. The function directly above it seems fine (and works fine in the spreadshet). I included the first and last lines of the code for this module below:

    There are a lot of macros/functions that have been built into this spreadsheet by other people, and the problem may be coming from one of them (although I don't see how they could affect the function). Since I don't think I would be able to post the spreadsheet, this may just have to remain an unsolved mystery unless there are any other potential problems anyone sees.

    Please Login or Register  to view this content.
    Thanks

  6. #6
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Public Function Not Showing Up in Spreadsheet

    Try splitting up the functions into 2 or more modules. Maybe there is a limit to the number of UDFs allowed per module or workbook.

  7. #7
    Registered User
    Join Date
    09-08-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Public Function Not Showing Up in Spreadsheet

    Got it. When I put it into a new module, I realized that there was another module with functions that already had this function in it. So the name of the function must have been ambiguous.

    Thanks a lot for your help!

+ 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