FindFormat Property

Microsoft Excel Visual Basic

expression.FindFormat

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

In this example, the search criteria is set to look for Arial, Regular, Size 10 font cells and the user is notified.

Sub UseFindFormat()

    ' Establish search criteria.
    With Application.FindFormat.Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 10
    End With

    ' Notify user.
    With Application.FindFormat.Font
        MsgBox .Name & "-" & .FontStyle & "-" & .Size & _
            " font is what the search criteria is set to."
    End With

End Sub