strange 400 error from web query

K

kieranish

I'm having a slight problem with a VBA web query. It returns a "400"
error, but then proceeds to fetch the relevant data anyway. Is there
any way to avoid the error message?

Code below:

Public Sub Getdata()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.berlinale.de/en_1/filmmarkt/screening_schedule/
programmsuche.php?print_view=result", _
Destination:=Range("A1"))
.Name = "DJIQuery"
.WebSelectionType = xlSpecifiedTables
.WebTables = "1" ' DJI table
.WebFormatting = xlWebFormattingNone
.EnableRefresh = True
.Refresh 'Execute query
.RefreshPeriod = 5 'Unit in minutes
.EnableRefresh = False
End With
End Sub
 
N

NickHK

Check the help for the .Refresh method and its augments. This will help
..Refresh False 'Execute query

NickHK

I'm having a slight problem with a VBA web query. It returns a "400"
error, but then proceeds to fetch the relevant data anyway. Is there
any way to avoid the error message?

Code below:

Public Sub Getdata()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.berlinale.de/en_1/filmmarkt/screening_schedule/programmsuche
..php?print_view=result", _
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top