How to Categorize the User Defined Function using VBA Macro
The following code adds the Get_Net_Working_Days UDF to the Date & Time Category.
Sub Add_UDF_To_Category()
Application.MacroOptions Macro:="PERSONAL.XLSB!Get_Net_Working_Days", Category:=2, Description:="Returns Net Working Days for 2009" '
End Sub
The above snippet uses the MacroOptions function that sets/resets properties that are available in Macro Options dialog
Insert Function Dialog – Before Macro
Insert Function Dialog – After Macro
You can create your categories by supplying a custom string for the Category:= parameter.
ReplyDeleteFor example: Category:="My UDF's"
See:
ReplyDeletewww.jkp-ads.com/articles/registerudf00.asp
Regards,
Jan Karel Pieterse
Excel MVP