Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default strange 400 error from web query

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

NickHK

wrote in message
ups.com...
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.../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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
strange error martinbarnes Excel Discussion (Misc queries) 3 April 1st 08 09:02 PM
Strange error Andy Setting up and Configuration of Excel 1 April 18th 06 08:11 PM
Help understanding truely strange error involving access query and filling cells puff Excel Programming 1 March 1st 06 08:37 PM
Very strange error superkopite Excel Discussion (Misc queries) 3 February 19th 06 11:21 AM
Strange error Filips Benoit Excel Programming 7 October 20th 04 08:02 PM


All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"