1

I am curious if anyone knows of a way to push predefined parameters to the function box in Excel when using a UDF? This explains how to accomplish what I want, but only within the VBA editor: VBA Function argument list select

My UDF has two arguments:

  1. a single cell range
  2. required parameter, either "up" or "down"

I was able to get tooltips (https://github.com/Excel-DNA/IntelliSense) and add UDF/argument descriptors to the function box (Application.MacroOptions), but in an ideal world, I could push the options for the second argument to the GUI also... much like the "true/false" dropdown appears for the fourth argument of VLOOKUP:

enter image description here

(ignore the tooltip overlay in the picture, I am referring to the TRUE/FALSE enumeration below it)

Anyone, know if this can/how this might be accomplished?

4
  • It is not possible to display a tooltip for a user defined function. Commented Apr 12, 2018 at 21:46
  • I'm not asking about a tooltip, instead how to effectively expose an enum to the excel function box GUI. However, that being said... it is actually possible to display a tool-tip for a UDF, I even posted a link in my question to a resource which I had no problem implementing (github.com/Excel-DNA/IntelliSense). Commented Apr 12, 2018 at 22:37
  • Have you tried defining aPublic Enum in the same module as your UDF and then setting your second parameter to be that enum type? Commented Apr 13, 2018 at 7:15
  • errr... not quite. the Public Enum works for the UDF (as in the user can type 0 or 1 as described in my enum) but it doesnt bring that up to the GUI. This answer kind of gets there (stackoverflow.com/questions/7188017/…), but the user has to know to type "v_" to bring up the defined names. Commented Apr 13, 2018 at 18:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.