I cannot get the following to work. I don't know how to interpret the source code from the website. Kyle123, you posted similar code on Jan 5, 2012. Could you explain to me what I am doing incorrect? Web asks for Permit Type and Permit Number and I want Excel to feed that to the website and return results back to Excel. Thank you.
Sub GetData3()
Dim per_type As Double
Dim per_nbr As Double
my_per_type = 1001
my_per_nbr = 20120001
With Sheet1.QueryTables.Add("URL;http://landinfo.sdcounty.ca.gov/permit/lookup/index.cfm?fa=dsplprmt", Sheet1.Range("A1"))
.PostText = "per_type=my_per_type&per_nbr=my_per_nbr&Submit=Search"
.RefreshStyle = xlOverwriteCells
.SaveData = True
.Refresh
End With
End Sub
Bookmarks