The Yahoo Finance web page layout had changed since the original post was made. This is a common problem with web queries whereby the extraction of certain areas of the web page using the ".WebTables" parameter can cause the coded web query to fail when changes are made to the web site layout structure.
The VBA code in the original post has been modified to now work correctly with the layout of the web page.
Should the layout change again, the solution is to record a macro by creating a new web query with the full URL and parameters and select the area in the web page for the historical data (Data > Import External Data > New Web Query). This will populate the ".WebTables" parameter with the correct value which can then be replaced in the original code.