so i simplified my code to make it as an example. my macro goes like this:
a user clicks an activecell, runs a macro and the macro runs a vlookup on the activecell, if a result is found, it is given in a msgbox.
My problem is if the user puts the active cell on a data that will return an error (or #N/A in excel formula terms) the macro runs into a type mismatch error. I just want to trap it so that if the active cell is on a data that returns an error and the macro is run, it will show a msgbox that basically says "Invalid Code" or "Item not found"
here is my example:
On error goto badentry
doesnt work, i dont know why.
Bookmarks