my Add-in contains a function
Function DStr(Date_Value As Date) As String
..
End Function
In the module "ThisWorkbook" I have the following procedure:
Private Sub Workbook_Open()
...
Application.MacroOptions Macro:="DStr", Category:=2, _
Description:="Converts Microsoft Excel's date format to a text string
'mmm dd, yyyy'.", _
HelpContextID:=HID, HelpFile:=ELP + FHlp
End Sub
This code does the following:
* assigns my functions to category 2 which is "Date & Time" (by default your
function is assigned to the category "User Defined")
* it adds the above description to the "Insert Function" window.
* HID is the assigned number in my help file to describe the function when
clicking help
* ELP is the path where my help file is (Excel Library path) and defined earlier
in the code:
ELP = Application.LibraryPath & Application.PathSeparator
* FHlp is the name of the help file defined as a public constant:
Public Const FHlp = "wqn.hlp" 'File: Help