I keep getting "Error 2042". See code snip bellow:
Not sure why I keep getting Error 2042. Please advise.![]()
Please Login or Register to view this content.
Thanks,
Stephen
I keep getting "Error 2042". See code snip bellow:
Not sure why I keep getting Error 2042. Please advise.![]()
Please Login or Register to view this content.
Thanks,
Stephen
Last edited by kstv; 07-21-2011 at 03:25 PM.
Welcome to the forum. Please take a few moments to read the forum rules and enclose your code snip in CODE tags ... before anyone can offer advice or assistance.
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Just as a quick answer ... in the expectation that you will add code tags.
It's not a good idea to use Excel and/or VBA function names as variables, subroutines or functions.
LOOKUP is a standard Excel function so it might give VBA a headache.
Regards
Last edited by TMS; 07-21-2011 at 03:43 PM.
Thanks. I changed the function name to FindZipCode. I still get the same error.
Please post a sample workbook with some typical data with the code in context. I'd like to see an example of how you are using this function.
Regards
see attached sample code.
I have two files. Main file and the validator file. I cannot place any macros in the main file so I need to interact with the main file using another excel file.
All I need to do is post the city, st, and county information in the main file. The main file contains 47,000 rows. I tried using a DO WHILE look and it took too long to complete. The VLOOKUP function is much more robust but it is not cooperating with what I need to do.
Please advise.
Thanks,
Stephen
New Text Document.txt
Why don't you post excel file and say what you need and expected result?
because reading the text file is not easy to understand what your need is
Best regard, -)iger-/iger
If you are pleased with a solution mark your post SOLVED.
Sorry about that.
Please see attached.
project_file.xlsx
zip_code_validator.xlsm
both file needs to by opened and ctrl+g from zip_code_validator to launch the form.
Thanks again.
stephen
It is confusing for me to read your long code
therefore, I just make a sample sub (see in module 2) that makes the same result as your need, I hope you can understand what it run and correct it appropriated to your problem,
see the sub in module 2 from attached file,
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks