A
alexm999
I run a standard find macro but if the file i try to import does not
have the particular find command (in the sample case below it's "PUP")
then my code breaks and I have an error
Is there anything i can input that will allow me to say that if the
word "PUP" is not there, then dont do anything, but if it's there, then
run my code below.
Windows("2.txt").Activate
Cells.Find(What:="PUP", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=6).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("K10").Select
ActiveSheet.Paste
have the particular find command (in the sample case below it's "PUP")
then my code breaks and I have an error
Is there anything i can input that will allow me to say that if the
word "PUP" is not there, then dont do anything, but if it's there, then
run my code below.
Windows("2.txt").Activate
Cells.Find(What:="PUP", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(rowOffset:=0, columnOffset:=6).Activate
Selection.Copy
Windows("DAILY OPERATIONS_2004.xls").Activate
Range("K10").Select
ActiveSheet.Paste