How can I add help text to a UDF in Excel 2016?

0

I have used UDFs for a long time now, but in the last version of Excel (2016) I can't find a way to see the help text in the cell. The most I was able to do was to find the name I have assigned to the variables (but not the type of var) in the Insert Function Dialog Box. How can I show the type of variable, as in earlier versions?

The UDF I am using as an example is:

Public Function myMacro(oPt1 As Integer, oPt2 As Integer) As String
        If oPt1 > 0 And oPt2 > 0 Then
                myMacro = oPt1 * oPt2
        Else
                myMacro = oPt1 * oPt2 * -1
        End If
End Function
Answer
Discuss

Answers

0

Unfortunately, you can't. There are workarounds, like clicking the Insert Function button to the left of the formula bar once you type the name of the macro, but there is nothing that works just like the native functionality for functions.

Alternatively, you could include the list of functions within the description of the function.

Go to the VBA Editor (F11) and hit F2 and select VBAProject from the top drop-down menu and select the correct module that holds the macro/udf from the left and then right-click the UDF on the right side and click Properties and enter the desired description there.

Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login