Got any Excel/VBA Questions? Free Excel Help.
There are at least 2 ways you can use to add a description to you UDF's, one is relatively well known, while the other is a simple but little known method. Lets use the better known method first.
Now here is the little known method. This is best done before you write your UDF.
How to add your UDF to a category
Another common question is, how to add your UDF to a certain category in the "Paste Function" dialog. By default all UDF's are added to the "User Defined" category. Here is how you can change this.
Simply run some code like this:
Application.MacroOptions Macro:="MyCustomFunction", _ Category:=3'Add to Math & Trig
The category numbers are as shown below:
0 No category appears only in All
1 Financial
2 Date & Time
3 Math & Trig
4 Statistical
5 Lookup & Reference
6 Database
7 Text
8 Logical
9 Information
10 Commands normally hidden
11 Customizing normally hidden
12 Macro Control normally hidden
13 DDE/External normally hidden
14 User Defined default
15 Engineering only available if the Analysis Toolpak add-in is installed
How to add a new category
By default when you write a Custom function (UDF) it is added to the User Defined by default. Although not well known, we can easily create our own category(s) to keep all our Custom functions in, here's how
Microsoft Excel will add the new category to the list for you. Once you have added at least one custom function to the new category (it will be probably be # 16), you can delete the "MyFunction" (or whatever name you used) name we typed in step 3. The new category will remain. If you delete the Microsoft Excel 4.0 macro sheet, functions already assigned to the custom category remain in that category; however, you cannot assign a new function to that category after you delete the macro sheet.
See also:
Delete Module After Running VBA Code |
Deleting Excel Named Ranges |
Delete Excel Sheet Event Code Macro |
Delete Excel Workbook Event Code |
Matching ComboBox Controls |
Free Training Course: Lesson 1 - Excel Fundamentals
See also: Index to Excel VBA Code; Index to Excel Freebies; Lesson 1 - Excel Fundamentals; Index to how to… providing a range of solutions
Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. If you’re looking for high-quality organic dried fruits you’ve come to the right place OzGrid is in no way associated with Microsoft.
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.