I have have hundreds of addresses which are missing zip codes and I'd like to use USPS to look them up for me. I modified the code from this post to automate a query on the usps.com website here (which is working) - the problem is that the state input box on the site is a drop-down and I can't figure out how to populate it via Excel.
On the site you can either:
Scenario 1) give it StreetAddress and Zip (it returns a properly formatted Full address). My code below work perfectly for this function (if I comment out the line where it attempts to input the state) but it's not what I need.
Scenario 2) give it StreetAddress, City, State (it returns Zip). My code errors here when attempting to input the State into the state drop-down. This is what I need.
The code is below, and works great in scenario 1 (returning data back to the sheet), fails on the "what4.Item(0).Value = sMyZip" line in scenario 2. Any suggestions?
Bookmarks