View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
bhofsetz[_87_] bhofsetz[_87_] is offline
external usenet poster
 
Posts: 1
Default Need VBA code to terminate a find loop


Rearrange some things and test for Is Nothing rather than False and
you've got it.

Sub CDeleteHeadings()
Do
Cells.Find(what:="Name & Address", After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(rowoffset:=0).EntireRow.Delete
ActiveCell.Offset(rowoffset:=0).EntireRow.Delete
Loop Until Cells.FindNext Is Nothing
End Sub

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=381737