The link may have an expiration and I would not depend on the links unless you have knowledge that they are immutable.
XUDLGBD
&C=DSJ
XUDLGPS
&C=ECW
This is the only argument that varies in the URL's. Also,
excel97.x=23&excel97.y=22
is looking to validate an actual mouse click on the Excel image. You may need to provide random numbers for the x and y coords. If the server keeps getting requests from the same IP and the mouse is always in the exact same position, they may disallow the download. This is a weak method of discouraging automation.
If you have to dissect many of these series codes, there are other alternatives...
Here is the code. See the example download below for usage...
<table border="1" bgcolor="White"><caption ALIGN=left>
<font size="2" face=Courier New>Example VBA Code:</FONT></caption><tr><td><font size="2" face=Courier New> <font color="#0000A0">Private</font> <font color="#0000A0">Declare</font> <font color="#0000A0">Function</font> URLDownloadToFile <font color="#0000A0">Lib</font> "urlmon" <font color="#0000A0">Alias</font> "URLDownloadToFileA" _
(ByVal pCaller <font color="#0000A0">As</font> Long, _
<font color="#0000A0">ByVal</font> szURL <font color="#0000A0">As</font> String, _
<font color="#0000A0">ByVal</font> szFileName <font color="#0000A0">As</font> String, _
<font color="#0000A0">ByVal</font> dwReserved <font color="#0000A0">As</font> Long, _
<font color="#0000A0">ByVal</font> lpfnCB <font color="#0000A0">As</font> Long) <font color="#0000A0">As</font> <font color="#0000A0">Long</font>
<font color="#0000A0">Sub</font> DownloadSelection()
<font color="#0000A0">If</font> Selection.Cells.Count <> 1 <font color="#0000A0">Then</font> <font color="#0000A0">Exit</font> <font color="#0000A0">Sub</font>
Selection.Offset(, 2) = "Downloading. Please wait..."
<font color="#0000A0">If</font> URLDownloadToFile(0, "http://213.225.136.206/mfsd/iadb/fromshowcolumns.asp?" & _
"Travel=NIxSCxSUx&FromSeries=1&ToSeries=50&DAT=RNG&FD=1&FM=Jan&FY=1963&" & _
"TD=3&TM=Apr&TY=2006&CSVF=TT&FN=N&C=" & Selection.Offset(, 1) & _
" &excel97.x=23&excel97.y=22", "C:\" & Selection & ".xls", 0, 0) = 0 <font color="#0000A0">Then</font>
<font color="#008000"> 'ok. Run Excel's query on the local file</font>
Selection.Offset(, 2) = "Downloaded to: C:\" & Selection & ".xls"
<font color="#0000A0">Else</font>
<font color="#008000"> 'failed to save page</font>
Selection.Offset(, 2) = "Download Failed."
<font color="#0000A0">End</font> <font color="#0000A0">If</font>
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
<font color="#0000A0">Private</font> <font color="#0000A0">Sub</font> CommandButton1_Click()
DownloadSelection
<font color="#0000A0">End</font> <font color="#0000A0">Sub</font>
</FONT></td></tr></table>
DownloadUrlBOE.zip