Import Web Data problem

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
When I query the website, I do get the yellow arrows. When I import the first table while recording the macro, I get the following...

Code:
[COLOR=darkblue]Sub[/COLOR] Macro3()
[COLOR=green]'[/COLOR]
' Macro3 Macro
[COLOR=green]'[/COLOR]

'
    [COLOR=darkblue]With[/COLOR] ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.tennisbetsite.com/index.php?option=com_mvx_trdb&Itemid=29&association=A&id1=5992&id2=1075&tid=11743&type=gameinfo" _
        , Destination:=Range("$A$1"))
        .Name = _
        "index.php?option=com_mvx_trdb&Itemid=29&association=A&id1=5992&id2=1075&tid=11743&type=gameinfo"
        .FieldNames = [COLOR=darkblue]True[/COLOR]
        .RowNumbers = [COLOR=darkblue]False[/COLOR]
        .FillAdjacentFormulas = [COLOR=darkblue]False[/COLOR]
        .PreserveFormatting = [COLOR=darkblue]True[/COLOR]
        .RefreshOnFileOpen = [COLOR=darkblue]False[/COLOR]
        .BackgroundQuery = [COLOR=darkblue]True[/COLOR]
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = [COLOR=darkblue]False[/COLOR]
        .SaveData = [COLOR=darkblue]True[/COLOR]
        .AdjustColumnWidth = [COLOR=darkblue]True[/COLOR]
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = "5"
        .WebPreFormattedTextToColumns = [COLOR=darkblue]True[/COLOR]
        .WebConsecutiveDelimitersAsOne = [COLOR=darkblue]True[/COLOR]
        .WebSingleBlockTextImport = [COLOR=darkblue]False[/COLOR]
        .WebDisableDateRecognition = [COLOR=darkblue]False[/COLOR]
        .WebDisableRedirections = [COLOR=darkblue]False[/COLOR]
        .Refresh BackgroundQuery:=[COLOR=darkblue]False[/COLOR]
    [COLOR=darkblue]End[/COLOR] [COLOR=darkblue]With[/COLOR]
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]

To import the second table, replace...

Code:
.WebTables = "5"

with

Code:
.WebTables = "6"

To import both the first and second table together...

Code:
.WebTables = "5,6"

To import the third table (live scores)...

Code:
.WebTables = "8"

Although, for some reason, the data is not actually imported.
 
Upvote 0
Hi Domenic,

That works perfectly. Thank you very much. It has stumped me for a long time. For some reason I dont get the yellow ticks so by using the 5,6 method that has done the trick. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,226,735
Messages
6,192,733
Members
453,752
Latest member
Austin2222

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top