Applies To
Name Object.
Description
Returns or sets what the name refers to, as shown in the following table. Read-write.
Value |
Meaning |
xlCommand |
Name is a user-defined macro. |
xlFunction |
Name is a user-defined function. |
xlNone |
Name is not a function or macro. |
See Also
Category Property.
Example
This example assumes that you created a custom function or command on a Microsoft Excel version 4.0 macro sheet. The example displays the function category, in the language of the macro. It assumes that the name of the custom function or command is the only name in the workbook.
With ActiveWorkbook.Names(1) If .MacroType <> xlNone Then MsgBox "The category for this name is " & .Category Else MsgBox "This name does not refer to" & _ " a custom function or command." End If End With