I'm getting a Run-time error '91': Object variable or with block variable not set on the Cells.Find code below. It works fine when I create it as a macro and run, but not in the VBA code.
Any ideas?
Code:
' select CSCIs sheet to format
Set Format_Sheet = Sheets("CSCIs")
' activate sheet
Format_Sheet.Activate
' find associated documentation cell
Cells.Find(what:="Associated Documentation", After:=ActiveCell, LookIn:= _
xlFormulas, lookat:=xlWhole, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
' set start row to row where title is
startRow = ActiveCell.Row
Any ideas?