Description Property

Microsoft Office Visual Basic

Returns or sets a descriptive String value for the specified COMAddin object. Read/write.

expression.Description

expression    Required. An expression that returns a COMAddin object.

ShowDescription property as it applies to the FileDialogFilter object.

Returns the description of each Filter object as a String value. The description is the text that is displayed in the file dialog box. Read-only.

expression.Description

expression    Required. An expression that returns a FileDialogFilter object.

ShowDescription property as it applies to the SharedWorkspaceLink and SharedWorkspaceTask objects.

Returns or sets a descriptive String value for the specified SharedWorkspaceLink or SharedWorkspaceTask object. Read/write.

expression.Description

expression    Required. An expression that returns a SharedWorkspaceLink or SharedWorkspaceTask object.

Remarks

The Description property is optional when a new shared workspace link or task is created, and may be empty.

Example

ShowAs it applies to the COMAddIn object.

The following example displays the description text of the Microsoft Accessibility COM add-in for drawing.

MsgBox "The description of this " & _
    "COMAddIn is """ & Application.COMAddIns. _
    Item("msodraa9.ShapeSelect"). _
    Description & """
				

ShowAs it applies to the FileDialogFilter object.

The following example iterates through the default filters of the SaveAs dialog box and displays the description of each filter that includes a Microsoft Excel file. The Extensions property is used to find the appropriate filter objects.

Sub Main()

    'Declare a variable as a FileDialogFilters collection.
    Dim fdfs As FileDialogFilters

    'Declare a variable as a FileDialogFilter object.
    Dim fdf As FileDialogFilter

    'Set the FileDialogFilters collection variable to
    'the FileDialogFilters collection of the SaveAs dialog box.
    Set fdfs = Application.FileDialog(msoFileDialogSaveAs).Filters

    'Iterate through the description and extensions of each
    'default filter in the SaveAs dialog box.
    For Each fdf In fdfs

        'Display the description of filters that include
        'Microsoft Excel files.
        If InStr(1, fdf.Extensions, "xls", vbTextCompare) > 0 Then
            MsgBox "Filter description: " & fdf.Description
        End If
    Next fdf

End Sub