Thread: [Solved] VBA and web data
View Single Post
 
Old 01-15-2014, 01:11 PM
YounesB3 YounesB3 is offline Windows XP Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2012
Posts: 37
YounesB3 is on a distinguished road
Default

Quote:
Originally Posted by BobBridges View Post
Try this:
Code:
Sub Test()
  Sheets("Temp").Select
  URL = "URL;http://www.metacritic.com/search/all/results?cats[game]=1" & Range("L4").Value
  MsgBox URL
  With ActiveSheet.QueryTables.Add(Connection:=URL, Destination:=Range("M5"))
    'blah, blah, blah
    End With
  End Sub
This won't make it work any better; it'll just tell you what URL it's being asked to look up, in case there's an error in it somewhere. If the URL still looks right to you, try cutting and pasting it into a browser and see whether it goes anywhere; maybe that'll reveal that the URL isn't valid. That's my suspicion, anyway.
Nope it works :

http://www.metacritic.com/search/all/results?cats[game]=1

Range("L4").Value

L4 value is : &date_range_from=09-31-2013&date_range_to=12-31-2013&score_range_from=60&search_type=advanced

If you combine the 2, it works.
Reply With Quote