View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kieranish@gmail.com is offline
external usenet poster
 
Posts: 2
Default strange 400 error from web query

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/filmmar...ning_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