+ Reply to Thread
Results 1 to 2 of 2

Pull USPS address to excel with Internet Explorer - input on page's state drop-down

  1. #1
    Registered User
    Join Date
    10-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Pull USPS address to excel with Internet Explorer - input on page's state drop-down

    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?

    Please Login or Register  to view this content.
    Last edited by cows; 02-20-2015 at 12:50 PM.

  2. #2
    Registered User
    Join Date
    10-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Pull USPS address to excel with Internet Explorer - input on page's state drop-down

    Oh boy, I figured it out! I had the wrong element name for the state - I change "sStateList" to "sState" and it works! I've added the full corrected code below so this may help someone else.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pull USPS address to excel
    By Sakthivel85 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-06-2020, 06:32 PM
  2. Replies: 4
    Last Post: 01-04-2014, 10:04 AM
  3. Pull Data From Internet Explorer/ Specific Web Browser
    By greekman34 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2013, 09:32 AM
  4. Setting Drop Down In Internet Explorer
    By ajlars in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2012, 12:18 PM
  5. MAKING EXCEL AS HOME PAGE IN INTERNET EXPLORER
    By Jagz in forum Excel General
    Replies: 4
    Last Post: 01-02-2005, 11:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1