VBA Web Query not working

32CARDS

Board Regular
Joined
Jan 1, 2005
Messages
123
I have not used a specific workbook for over 12 months, but it worked before.

I suspect the web page owner's security upgrades may have changed things, or the web browser I use on this specific computer is no longer compatible, I'm not sure.


The VBA URL references is
Code:
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://tattsbet.ubet.com/racing/" & Range("A1"), Destination:=Range("$A$3"))

Range A1 refers to the date which constantly changes....


The Runtime error is 1004
at
Code:
.Refresh BackgroundQuery:=False


--------------

Excel version is 2010
File version of IE is;
8.00.6001.18702 (longhorn_ie8_rtm(wmbla).090308-0339)

--------------,

OS Platform
Windows XP Pro
Version 2002
Service Pack 3

--------------------

I *know* what the obvious answer is and am very well aware this is the reason my old PC not compatible
with the current secure web page, making me think this is the root cause of error 1004 ?

I just need confirmation this is so.


If this is the problem, ( and it is ), then will a windows 10 upgrade help resume the web query using the VBA method relative to the above URL ?

Will Windows 7 OS work

Finally, will my Excel 2010 work with OS and PC upgrades.
--------------------------------------


For the recored, the entire web query code in case anyone needs to test for my answers is:
Day and date format for A1
2018/03/03/raceday

<tbody>
</tbody>
Code:
'READY TO GO.>>


'https://tattsbet.ubet.com/racing
delete_Connections
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://tattsbet.ubet.com/racing/" & Range("A1"), Destination:=Range("$A$3"))


'            With ActiveSheet.QueryTables.Add(Connection:= _
'        "URL;http://tatts.com/racing/" & Range("A1"), Destination:=Range("$A$3"))
        .Name = "RaceDay"
        .Destination = Sheets("RACELIST").Range("A3")
        .Name = "raceday_2"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
'        .SaveData = True
        .SaveData = False
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = "4,5,6,7,8,9,10"
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
'''''''''''''''''''>>
'PREPERATIONS TO CONVERT LIST


Thanks in Advance
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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