How to Show Mandatory Arguments in Bold for Excel C++ Custom Functions
Question details
The user wants to format mandatory arguments in bold for a C++ custom function in Excel, similar to how built-in functions display them.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Developing a custom C++ add-in for Excel and registering functions using the Excel12f and xlfRegister API.
- Observed behavior
- Arguments for the custom C++ function appear in normal text in the Insert Function dialog, unlike built-in functions which display required arguments in bold.
Ensure you have access to the C++ source code of your Excel XLL add-in and the Microsoft Excel XLL Software Development Kit (SDK).
Consult the Microsoft Office Development Community
Since customizing the Insert Function dialog for C++ XLLs involves advanced API behaviors, the best place for a definitive workaround is Microsoft Q&A.
Excel's native UI internally manages metadata for built-in functions to highlight mandatory arguments. Custom XLL functions registered via xlfRegister often do not have native access to this specific UI formatting hook in standard API calls. Seeking specialized developer support is highly recommended.
Open your web browser and visit the official Microsoft Q&A website.
Search for and select the 'Office Development' tag to ensure your question reaches developers familiar with the Excel XLL SDK.
Create a new post detailing your specific xlfRegister call and the C++ code snippet used to register your custom function. Ask if there are updated workarounds for bolding mandatory arguments.

Review the xlfRegister Function Documentation
Verify your registration string parameters against the latest Microsoft SDK documentation to ensure you are passing all available argument data.
Try WPS Office for Your Spreadsheet and Macro Needs
If you are looking for a powerful, lightweight, and cost-effective spreadsheet solution that supports advanced macros, try WPS Office. It offers extensive compatibility with Excel files and features an intuitive environment for your daily data processing tasks.
- 1. Download the Installer: Visit the official WPS Office website and click the Free Download button.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
- 3. Open WPS Spreadsheet: Launch WPS Office and select Spreadsheet to start creating or editing your workbooks immediately.

Frequently Asked Questions
Why do built-in Excel functions show bold arguments but custom ones do not?
Excel's native user interface utilizes internal metadata to format built-in function arguments automatically. The standard xlfRegister API used for custom C++ add-ins does not expose this specific text formatting property for the Insert Function dialog.
Can I use VBA to make custom function arguments bold?
No. While you can add custom User Defined Function (UDF) descriptions and argument prompts using the Application.MacroOptions method in VBA, it does not natively support making specific arguments bold in the Insert Function dialog.
Are there alternative ways to guide users on mandatory arguments in Excel XLLs?
Yes, developers often work around this limitation by prefixing argument names with 'Req_' or explicitly stating '(Required)' in the detailed argument description string passed during registration.




