G
Guest
Hi
For some reason my code is returning the foundcell as true all the time even
though the data is not there. If I do a manual find then it comes back as not
found but with the code it comes back as found which is not correct.
Below is the code I have, if anyone can give me some info on what to do to
fix this probelm.
stVoucherID = Application.Range("A" & dbnum).Value
Sheets(2).Select
Application.Range("F1").Select
Set foundcell = Cells.Find(What:=stVoucherID, After:=ActiveCell,
LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
True)
If foundcell Is Nothing Then
Sheets(3).Select
Application.Range("a1").Select
End if
Thanks
Noemi
For some reason my code is returning the foundcell as true all the time even
though the data is not there. If I do a manual find then it comes back as not
found but with the code it comes back as found which is not correct.
Below is the code I have, if anyone can give me some info on what to do to
fix this probelm.
stVoucherID = Application.Range("A" & dbnum).Value
Sheets(2).Select
Application.Range("F1").Select
Set foundcell = Cells.Find(What:=stVoucherID, After:=ActiveCell,
LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
True)
If foundcell Is Nothing Then
Sheets(3).Select
Application.Range("a1").Select
End if
Thanks
Noemi