Hi
I have the macro that searches for text information and then inserts a page
break when it finds it.
However, if the text ins't in the spread sheet then it crashes, below is my
code
Cells.Find(What:="CM", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:
= _
True, SearchFormat:=False).Activate
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell
Does anyone know what could be put into this to ignore the page break command
if the txt isn't found in the sheet??
Regards Gaz
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200511/1