Thread: .find help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Wylie C Wylie C is offline
external usenet poster
 
Posts: 10
Default .find help

I have the following code that works fine. What I would like to know, is
there a way to write the For each wks....Next wks statement to set more than
one font attribute at a time? My code finds the cell then only sets the font
name. Can I set the font bold and italic at the same time? How can I code
this different to make it work the way I want?

Thank you.

Private Sub Testing()
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
On Error GoTo quit
wks.Cells.Find(What:="test", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, MatchCase:=False).Font.Name = "Times
New Roman"
Next wks
quit:
Exit Sub
End Sub