设置或返回要查找的单元格格式类型的搜索条件。
expression.FindFormat
expression 必需。该表达式返回“应用于”列表中的对象之一。
在本示例中,搜索条件设置为查找文字为 Arial、常规和 10 号字体的单元格,并通知用户。
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