I’m preceding a Selection.Find with On Error GoTo NotFound
Is this going to GoTo NotFound on ANY and ALL ERRORS?
Is there a way to say if the Selection is not Found go to NotFound?
![]()
Please Login or Register to view this content.
I’m preceding a Selection.Find with On Error GoTo NotFound
Is this going to GoTo NotFound on ANY and ALL ERRORS?
Is there a way to say if the Selection is not Found go to NotFound?
![]()
Please Login or Register to view this content.
Because you forgot to place subroutine name NotFound
Correct this code
The underline is the code that you want to put itOn Error GoTo NotFound
Columns("EH:EH").Find(What:=NewEntry, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
NotFound:
If Err.Number = ____ then
Msgbox _______
Else
End if
N. Yauvasuta
Power User Excel.
Actually I do have "NotFound: " in my code, I just left it out of my post.
I forced the error number to a msgbox and found it to be #91 but
Is there a list of Error numbers somewhere?
This link should help
http://support.microsoft.com/kb/146864
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Once the on error command is run it is active for all errors until changed or turned off
use
after your find command![]()
Please Login or Register to view this content.
and of course read the artice that VBA Noob suggested
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks