Is there a way to make UDF that gives a description like the native Excel functions have when user clicks the Fx button?

后端 未结 5 1182
后悔当初
后悔当初 2020-12-05 03:13

If I type =vlookup( (or any other native Excel function) in the formula bar and then click the little Fx button to the left of the formula I get a Function Argu

5条回答
  •  不知归路
    2020-12-05 03:47

    I suggest further investigating the Application.MacroOptions method. That method allows you to provide not only a description for the function, but also a description for each of the arguments. For example, if you have a function called "SampleFunction" that takes two arguments, you can run the following and it will set you up nicely for using the fx button with your function.:

    Private Sub RegisterMyFunction()
        Application.MacroOptions _
            Macro:="SampleFunction", _
            Description:="calculates a result based on provided inputs", _
            Category:="My UDF Category", _
            ArgumentDescriptions:=Array( _
                "is the first argument.  tell the user what it does", _
                "is the second argument.  tell the user what it does")
    End Sub
    

提交回复
热议问题