Hi.. I'm currently using this code:
Sub Test()
Dim ws As Worksheet
Application.ScreenUpdating = False
Set ws = ActiveSheet
'http://mywebsite.com/test=12345&Date=8/16/2013&abc=1"
Dim strDate As String
strDate = Date
www = "URL;http://mywebsite.com/test=12345&Date=" _
& strDate & "&abc=1"
Sheets("Test").Activate
With ActiveSheet.QueryTables.Add(Connection:=www, Destination:=Range("'Test'!A1"))
ws.Activate
Application.ScreenUpdating = True
.Name = _
"Test"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "10"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
This code pulls the exact web table that I want.. The problem that I'm experiencing is....
This table is too BIG! The table that it's querying is 4500 rows. I only need about 25 specific rows of this whole table. At most, I would only need the first 1535 rows...and this would absolutely contain all of the data that I need. When I do this with a total of 30+ different pages...it takes forever!
Is there any way to code this so that it only brings in a very specific rows? Or even just the first 1500 rows so that the query doesn't take so long?
As always, appreciate any help that I can get!!!!
Bookmarks