Web Query not Working

marioubillus

New Member
Joined
Feb 4, 2014
Messages
4
Hi all,

I have <acronym>vba</acronym> code for retriveing historical exchange rates is no longer working (used to work OK a couple of months ago) and can't figure out why.

Here is the part of the code that has the query:

------------------------------
curr = "PEN"

qurl = "http://www.oanda.com/lang/es/currency/historical-rates-classic?date_fmt=normal&date=" & EndDate & "&date1=" & StartDate & "&exch=USD&exch2=USD" & "&expr=" & curr & "&expr2=" & curr & "&margin_fixed=0&format=HTLM&redirected=1"


QueryQuote:
With Sheets("TC").QueryTables.Add(Connection:="URL;" & qurl, Destination:=Sheets("TC").Range("E1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With

---------------------------
The resulting qurl value (http://www.oanda.com/lang/es/curren...2=PEN&margin_fixed=0&format=HTLM&redirected=1) works OK (displays the data I need, so no date formatting issues).

The problem is with retrieving and pasting the data into Excel

Thanks in advance for any help

 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
have they changed the site to aspx or updated their login scripts, is it related to the 2014 form controls updates at the top of the page
 
Upvote 0
have they changed the site to aspx or updated their login scripts, is it related to the 2014 form controls updates at the top of the page

Thanks. Had that issue before with other macros but (as far as I know) it’s already solved. NO problems with opening or operating the file except for this issue of not retrieving and pasting the data in the Excel sheet.
 
Upvote 0
if you look at the underlying html from the site, does it still retain the locations you expect to get data from, named the same
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,228
Members
448,951
Latest member
jennlynn

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