A
alexm999
Im running a simple Find macro to populate cells from another file. Th
problem im having is when the term im finding is not there, my macr
breaks and stops... Is there a way i can bypass or do something tha
will jump to the next find if the first find was not found?
Here's my Code:
Windows("10.txt").Activate
Cells.Find(WHAT:="DDCE", After:=ActiveCell, LookIn:=xlFormulas
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
MatchCase:= _
False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=5).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("E18").Select
ActiveSheet.Paste
Windows("10.txt").Activate
Cells.Find(WHAT:="EXT", After:=ActiveCell, LookIn:=xlFormulas
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
MatchCase:= _
False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=4).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("J18").Select
ActiveSheet.Past
problem im having is when the term im finding is not there, my macr
breaks and stops... Is there a way i can bypass or do something tha
will jump to the next find if the first find was not found?
Here's my Code:
Windows("10.txt").Activate
Cells.Find(WHAT:="DDCE", After:=ActiveCell, LookIn:=xlFormulas
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
MatchCase:= _
False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=5).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("E18").Select
ActiveSheet.Paste
Windows("10.txt").Activate
Cells.Find(WHAT:="EXT", After:=ActiveCell, LookIn:=xlFormulas
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
MatchCase:= _
False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=4).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("J18").Select
ActiveSheet.Past