+ Reply to Thread
Results 1 to 14 of 14

UDFs appear in multiple categories when clicking on f(x)

  1. #1
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    UDFs appear in multiple categories when clicking on f(x)

    I have approximately a dozen UDFs that have been developed over several years. When looking to employ a particular one from the function address window, I click on the f(x) and they appear as multiple categories. See Capture1.jpg. I then have to click on each User Defined category to find the one I want. Each category may hold one or many UDFs. See Capture2.jpg and Capture3.jpg.

    They are all stored in mylibrary.xlam as seen in Capture4.jpg.

    Am I able to consolidate these into one User Defined category?
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    You'll be needing Application.MacroOptions

    Example:
    Please Login or Register  to view this content.
    Silly example, but shows you the method.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    Re: UDFs appear in multiple categories when clicking on f(x)

    Thanks Olly; will give it a try.

    One question. Run the sub in Personal.xlsb or MyLibrary.xlam

    Alan
    Last edited by alansidman; 10-03-2014 at 01:45 PM.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    The effect persists only per session, so stick the sub containing the MacroOptions in the Workbook_Open event of the addin

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    Re: UDFs appear in multiple categories when clicking on f(x)

    Thanks again. That is probably why I am getting a 1004 error. I have researched that error, but continues to fail. Will follow up on your suggestion.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    Just saw your edit - run that method in the workbook which contains the functions.

    You could run it in another workbook, but then you'd be entering the world of fully qualifying procedure references, and the associated error handling (if for example the addin was disabled). Simpler to run it in each workbook which contains functions, for those functions - if that makes sense?!

    Shout if you don't get it sorted, ping me your addin, I'll have a look

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    Re: UDFs appear in multiple categories when clicking on f(x)

    Here is the code I have attempted to run. Attempted to place as Workbook Open event in the Addin also. All receive the dreaded 1004 error message. Failed.

    Please Login or Register  to view this content.
    Thanks for looking
    Attached Files Attached Files

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    Alan, I'm half way through understanding what's happening, but wine and puppy dog are taking over. I'll look at this over the weekend, if that's ok?!

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    Re: UDFs appear in multiple categories when clicking on f(x)

    Olly,
    There is no rush on this. It is something that has been festering for over a year and today I decided to take action to try and figure it out. Enjoy your weekend, your puppy and of course your wine.

    Alan

  10. #10
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    Okay, figured it - the macro references need to be fully qualified.

    So, in a general module, use:
    Please Login or Register  to view this content.
    And in the workbook module:
    Please Login or Register  to view this content.
    Works for my testing here - see if it works for you?

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,102

    Re: UDFs appear in multiple categories when clicking on f(x)

    May I suggest that you don't give your routines the same name as the module that contains them?
    Everyone who confuses correlation and causation ends up dead.

  12. #12
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: UDFs appear in multiple categories when clicking on f(x)

    Further update: I transferred to another machine to test, and it failed again. Try changing the workbook module to this:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Olly; 10-06-2014 at 08:22 AM.

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,102

    Re: UDFs appear in multiple categories when clicking on f(x)

    You can't run MacroOptions unless there is a workbook open, IIRC, so you could simply add a Workbooks.Add statement before you run the MacroOptions part.

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,992

    Re: UDFs appear in multiple categories when clicking on f(x)

    Thanks Rory and Olly;

    Will post later after testing.

+ 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. Replies: 0
    Last Post: 02-24-2014, 03:15 PM
  2. Replies: 1
    Last Post: 05-15-2013, 06:55 AM
  3. Tabulating multiple voters w/ multiple categories
    By larrystiver in forum Excel General
    Replies: 6
    Last Post: 09-24-2011, 02:49 PM
  4. Replies: 0
    Last Post: 07-22-2011, 03:51 PM
  5. Multiple categories
    By Luders in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2009, 07:31 AM

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