Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Keep getting the same error when I can't find the text. Basically, I have
the code doing exactly what I want when I find "final summary". That is, deleting everything from "final summary" down. But when it doesnt find it, I get the error. I looked here and tried some of the ways w/ setting the range. When it didn't find it, it worked great. But when it did find it, it doesn't do what I wanted it to do. Here is the code that works fine when it finds "final summary" and errors when not: Cells.Find(what:="final summary", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Selection.ClearContents But, I can't get it to work when I try the range method. So, the code above works fine when it finds "final summary" and errors when not. And the range method works fine when it doesn't find "final summary", but doesn't delete "final summary" and everthing below it. Any ideas/suggestions? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
#VALUE ERROR Question | Excel Discussion (Misc queries) | |||
Error msg question | Excel Discussion (Misc queries) | |||
#Ref error question | Excel Worksheet Functions | |||
'On Error' question | Excel Programming | |||
Drillthrough MDX ERROR(Error.Number:-21467259) ?(urgent question) | Excel Programming |