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?

  • It is not possible to display a tooltip for a user defined function. – Sorceri Apr 12 '18 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 (https://github.com/Excel-DNA/IntelliSense). – Salvatore Fanale Apr 12 '18 at 22:37
  • Have you tried defining a`Public Enum` in the same module as your UDF and then setting your second parameter to be that enum type? – AJD Apr 13 '18 at 07: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 (https://stackoverflow.com/questions/7188017/how-can-i-use-enum-identifiers-in-excel-udf), but the user has to know to type "v_" to bring up the defined names. – Salvatore Fanale Apr 13 '18 at 18:57

0 Answers0