I have a Userform that asks the user to enter a UK post code into 2 text fields. e.g
txtField1 = L27
txtField2 = 4HD
I then have a Lookup function using txtField1 to search for the first part of the postcode in a list to return a result. Everything works swimmingly until an incorrect post code is entered.
I then get a run-time error which is not ideal for the user.
Is there a way I could write some error handling code that tells the user an invalid post code has been entered rather than getting the run-time error?
My Lookup function is here:
This is the current error handling I have in place but this obviously doesn't pick up if an invalid post code has been entered.![]()
Please Login or Register to view this content.
If there is any standard error handling code to effectively by-pass the run-time error then this should work fine.![]()
Please Login or Register to view this content.
Thanks in advance.
Bookmarks