Remarks

Use the method or the property of the collection to return a CustomProperty object.

Once a CustomProperty object is returned, you can add metadata to worksheets using the property with the Add method.

Example

In this example, Microsoft Excel adds identifier information to the active worksheet and returns the name and value to the user.

Visual Basic for Applications
Sub CheckCustomProperties() Dim wksSheet1 As Worksheet Set wksSheet1 = Application.ActiveSheet ' Add metadata to worksheet. wksSheet1.CustomProperties.Add _ Name:="Market", Value:="Nasdaq" ' Display metadata. With wksSheet1.CustomProperties.Item(1) MsgBox .Name & vbTab & .Value End With End Sub

See also: