VBA & Macro Problems

How to Add Descriptions for Excel VBA User-Defined Functions

Tauseeq MagsiTauseeq Magsi Oct 26, 2026 868 views

Question details

The user wants to add descriptions and argument tooltips to Excel VBA User-Defined Functions so they appear clearly in the Function Wizard.

How to Add Descriptions for Excel VBA User-Defined Functions
Product
Excel
Device & OS
not provided
Scenario
Creating custom VBA functions and wanting to provide clear guidance for users through function and argument descriptions.
Observed behavior
Excel does not automatically provide function tooltips or descriptions for User-Defined Functions (UDFs) by default, unlike its built-in formulas.
Before you start

Ensure you have the Developer tab enabled in Excel and that your workbook is saved as a Macro-Enabled Workbook (.xlsm) to retain your VBA code.

Solution 1Recommended

Use Application.MacroOptions to Register Descriptions

Run a VBA subroutine using Application.MacroOptions to register your custom function, its general description, and individual argument descriptions to the Function Wizard.

While Excel doesn't natively show on-the-fly tooltips as you type UDFs, you can populate the Function Wizard with detailed descriptions for both the function itself and its arguments using the Application.MacroOptions method.

1
Open the VBA Editor

Press Alt + F11 to open the Visual Basic for Applications (VBA) editor in your Excel workbook.

2
Insert a New Module

Click Insert > Module from the top menu and write your custom User-Defined Function (e.g., Function MyFunc(MyValue As Variant, MyRange As Range)).

3
Create the Registration Subroutine

In the same module, create a new Subroutine (e.g., Sub RegisterFunction()). Inside it, type Application.MacroOptions. Use the 'Macro' parameter to specify your function name, 'Description' for the main description, 'Category' for the grouping, and an Array for 'ArgumentDescriptions'.

4
Run the Subroutine

Place your text cursor inside your RegisterFunction subroutine and press F5, or click the Run button. This permanently registers the function descriptions for this workbook.

5
Use the Function and View Tooltips

Return to your worksheet, type =MyFunc( and press Ctrl+Shift+A to insert the argument names, or press Shift+F3 to open the Function Wizard and view your newly added descriptions.

Use Application.MacroOptions to Register Descriptions
One-Time Execution: You only need to run the registration subroutine once. Excel will remember the descriptions for this UDF within the workbook even after you close the VBA editor.
Advanced VBA Support

Write and Manage VBA Macros with WPS Spreadsheet

WPS Office provides robust, built-in support for VBA macros and User-Defined Functions, allowing you to automate tasks and create custom functions seamlessly.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your macro-enabled spreadsheet.
  2. 2. Access the Developer Tab: Navigate to the Developer tab on the top ribbon and click 'VBA Editor'.
  3. 3. Write Your UDF: Insert a module, write your custom function, and execute Application.MacroOptions to add descriptions.
  4. 4. Apply in Your Sheet: Use your custom function in spreadsheet cells and access the Function Wizard to view your descriptions.
Fully compatible with Microsoft Excel VBA syntax and macros (.xlsm formats).Built-in VBA editor to easily write, debug, and run your User-Defined Functions.Lightweight installation with a highly familiar user interface for seamless migration.Free to use with comprehensive spreadsheet capabilities.
microsoft office alternative - wps office

Frequently Asked Questions

Why aren't my VBA function tooltips showing up as I type?

Excel does not display on-the-fly Intellisense tooltips as you type for VBA User-Defined Functions. To see assistance, you must press Ctrl+Shift+A after typing the function name and opening parenthesis to insert argument placeholders, or use the Function Wizard (Shift+F3).

Do I need to run the Application.MacroOptions code every time I open the workbook?

No, you only need to run the Application.MacroOptions subroutine once. The descriptions and category assignments are permanently saved within the workbook configuration.

Can I categorize my custom function in a specific Function Wizard group?

Yes, by using the Category argument in Application.MacroOptions, you can assign your UDF to a built-in category by passing its corresponding index number, or supply a custom string to create a brand new category.