• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pull the city and state from web

Surendra100

New Member
My code is
Code:
Private Sub CommandButton1_Click()
Dim IE As New InternetExplorer
'IE.Visible = True
IE.navigate "http://www.mapszipcode.com/" & TextBox1.Value & ".html"
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Trim(Doc.getElementsByTagName("a")(2).innerText)
IE.Quit
TextBox2.Value = sDD
TextBox3.Value = sDD
Sheet1.Range("B1") = TextBox1.Value
Sheet1.Range("B3") = TextBox2.Value
Sheet1.Range("B4") = TextBox3.Value
End Sub
 

Attachments

Last edited by a moderator:
Top