try this
Sub web()
Dim ie As InternetExplorer
Dim tbl
Dim tbls
Set ie = CreateObject("Internetexplorer.application")
ie.Visible = True
URL = "http://www2.fdic.gov/closedsales/LoanSales.asp"
ie.Navigate URL
Do While ie.ReadyState < 4 Or ie.Busy = True
DoEvents
Loop
Set mindt = ie.Document.getelementsbyname("MinDate")
Set maxdt = ie.Document.getelementsbyname("MaxDate")
mindt.Item(0).Value = "8/01/2009"
maxdt.Item(0).Value = "8/31/2009"
Set fnd = ie.Document.getelementbyid("Action")
fnd.Click
Do While ie.ReadyState < 4 Or ie.Busy = True
DoEvents
Loop
Set shtn = Sheets("sheet1")
Rng = shtn.Cells(Rows.Count, "C").End(xlUp).Row
Set tbl = ie.Document.getelementsbytagname("Table")
ie.ExecWB 17, 0
ie.ExecWB 12, 0
shtn.Range("A" & Rng).Select
ActiveSheet.Paste
ie.Quit
End Sub
On Oct 20, 6:09*am, NewMoon1918
wrote:
I am having problems pulling data from the web into Excel 2007. *The data in
question can be found at the following site:
http://www2.fdic.gov/closedsales/LoanSales.asp
As a point of reference, I ran a search of data from 8/1/09 through 8/31/09
at that location and the website produced a data table that I attempted to
bring into excel 2007 by going to Data/Get External Data/From Web. *When I
pull it into excel, it pulls the following prompt (which can be found at the
bottom of the initial website noted above:
"For sales with offices other than Dallas - Field Office Branch (FOB) please
refer questions to Dallas-FOB. *See "Loan Sales FAQ" for contacts. "
Any idea what I am doing wrong?