Hi,
I have the following code and How it can be Error Handled when the following output turns out becuase of Server problem
<table border="0" cellpadding="0" cellspacing="0" width="668"><col style="mso-width-source:userset;mso-width-alt:3254;width:67pt" width="89"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <col style="mso-width-source:userset;mso-width-alt:2486; width:51pt" span="4" width="68"> <col style="mso-width-source:userset;mso-width-alt:3108;width:64pt" width="85"> <col style="mso-width-source:userset;mso-width-alt:2486;width:51pt" width="68"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;width:67pt;font-size: 11.0pt;color:white;font-weight:700;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" height="20" width="89">CNX INFRA</td> <td class="xl64" style="border-left:none;width:58pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="77">08-Jul-11</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3177.05</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3190.15</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3144.35</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3151.65</td> <td class="xl65" style="border-left:none;width:64pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="85">142856927</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">1752.97</td> <td class="xl66" style="border-left:none;width:58pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="77">Column1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20">CNX IT</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6793</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6835.25</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6714</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6723.85</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">11587450</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">631.28</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX MNC</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"><HEAD>****** HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD></td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20"><H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> inaccurate</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> or the server has been instructed not to let you have it. CNX PHARMA</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4897.4</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4910.35</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4840.15</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4850.3</td> <td class="xl70" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">3161622</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX PSE</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"><HEAD>****** HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD></td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20"><H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> inaccurate</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> or the server has been instructed not to let you have it. CNX PSU BANK</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4026.9</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4074.85</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4003.9</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4018.2</td> <td class="xl70" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">9784008</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX REALTY</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">291.75</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">302.2</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">290.45</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">297.75</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">77007835</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">624</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20">CNX SERVICE</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">7044.95</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">7072.05</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6953.4</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6962.2</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">60769785</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">2944.68</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl71" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">S&P CNX DEFTY</td> <td class="xl72" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">08-Jul-11</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4483.9</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4486.6</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4413.1</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4422.05</td> <td class="xl73" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl73" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl74" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> </tbody></table>
VBACode
Kindly help me in Hanldling errors . I want this code to be Re-Run when the out put has errors till all the quotes are filled.
Is it possible?
Thank you
I have the following code and How it can be Error Handled when the following output turns out becuase of Server problem
<table border="0" cellpadding="0" cellspacing="0" width="668"><col style="mso-width-source:userset;mso-width-alt:3254;width:67pt" width="89"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <col style="mso-width-source:userset;mso-width-alt:2486; width:51pt" span="4" width="68"> <col style="mso-width-source:userset;mso-width-alt:3108;width:64pt" width="85"> <col style="mso-width-source:userset;mso-width-alt:2486;width:51pt" width="68"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;width:67pt;font-size: 11.0pt;color:white;font-weight:700;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" height="20" width="89">CNX INFRA</td> <td class="xl64" style="border-left:none;width:58pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="77">08-Jul-11</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3177.05</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3190.15</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3144.35</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">3151.65</td> <td class="xl65" style="border-left:none;width:64pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="85">142856927</td> <td class="xl65" style="border-left:none;width:51pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="68">1752.97</td> <td class="xl66" style="border-left:none;width:58pt;font-size:11.0pt; color:white;font-weight:700;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#4F81BD;mso-pattern:#4F81BD none" width="77">Column1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20">CNX IT</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6793</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6835.25</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6714</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6723.85</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">11587450</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">631.28</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX MNC</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"><HEAD>****** HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD></td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20"><H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> inaccurate</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> or the server has been instructed not to let you have it. CNX PHARMA</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4897.4</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4910.35</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4840.15</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4850.3</td> <td class="xl70" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">3161622</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX PSE</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"><HEAD>****** HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD></td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20"><H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> inaccurate</td> <td class="xl69" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> or the server has been instructed not to let you have it. CNX PSU BANK</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4026.9</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4074.85</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4003.9</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">4018.2</td> <td class="xl70" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">9784008</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">CNX REALTY</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">291.75</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">302.2</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">290.45</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">297.75</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">77007835</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">624</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl67" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" height="20">CNX SERVICE</td> <td class="xl68" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">08-Jul-11</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">7044.95</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">7072.05</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6953.4</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">6962.2</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">60769785</td> <td class="xl69" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none" align="right">2944.68</td> <td class="xl70" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext; background:#DCE6F1;mso-pattern:#DCE6F1 none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl71" style="height:15.0pt;border-top:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" height="20">S&P CNX DEFTY</td> <td class="xl72" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">08-Jul-11</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4483.9</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4486.6</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4413.1</td> <td class="xl73" style="border-top:none;border-left:none; font-size:11.0pt;color:black;font-weight:400;text-decoration:none;text-underline-style: none;text-line-through:none;font-family:Calibri;border:.5pt solid windowtext" align="right">4422.05</td> <td class="xl73" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl73" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> <td class="xl74" style="border-top:none;border-left:none;font-size:11.0pt; color:black;font-weight:400;text-decoration:none;text-underline-style:none; text-line-through:none;font-family:Calibri;border:.5pt solid windowtext"> </td> </tr> </tbody></table>
VBACode
Code:
Public Sub downloadNse()
Dim arrURL() As String
Dim dtmDate As Date
Dim c As Range
Dim i As Long
Dim s As String
Dim bArray() As Byte
Dim hFile As Integer
Dim strLocalFile As String
Dim sTemp As String
Dim iPtr As Long
Dim oXMLHTTP As MSXML2.XMLHTTP '(reference to C:\Windows\System32\msxml2.dll for 32 bit systems)
'-------------------------------------------------------------------------------
'ENTER CONSTANTS HERE - NOTHING ELSE *SHOULD* NEED TO BE CHANGED
Const CELL_WITH_DATE As String = "B1"
Const RANGE_WITH_SYMBOLS As String = "A1:A19"
Const SAVE_DIRECTORY As String = "E:\Macros\Output\Indices\" 'end with forward slash
'-------------------------------------------------------------------------------
dtmDate = Range(CELL_WITH_DATE).Value '//Date
strLocalFile = SAVE_DIRECTORY & Format(dtmDate, "dd-mm-yyyy") & "_.csv"
For Each c In Range(RANGE_WITH_SYMBOLS) '//11 cells with symbols
If Len(c.Value) > 0 Then
ReDim Preserve arrURL(1 To 2, 0 To i)
arrURL(1, i) = "http://www.nseindia.com/content/indices/histdata/"
arrURL(1, i) = arrURL(1, i) & UCase(c.Value)
arrURL(2, i) = UCase(c.Value)
arrURL(1, i) = arrURL(1, i) & Format(dtmDate, "dd-mm-yyyy") & "-" & Format(dtmDate, "dd-mm-yyyy") & ".csv"
i = i + 1
End If
Next c
'download the file from the web to the hardrive
'loop through symbols in turn
Set oXMLHTTP = New XMLHTTP
hFile = FreeFile
Open strLocalFile For Binary As #hFile
For i = 0 To UBound(arrURL, 2)
oXMLHTTP.Open "GET", arrURL(1, i), False
oXMLHTTP.send
'Wait for request to finish
Do While oXMLHTTP.readyState <> 4
DoEvents
Loop
bArray = oXMLHTTP.responseBody
sTemp = ""
For iPtr = LBound(bArray) To UBound(bArray)
sTemp = sTemp & Chr(bArray(iPtr))
Next iPtr
sTemp = Replace(sTemp, "Date", "")
sTemp = Replace(sTemp, "Open", "")
sTemp = Replace(sTemp, "High", "")
sTemp = Replace(sTemp, "Low", "")
sTemp = Replace(sTemp, "Close", "")
sTemp = Replace(sTemp, "Shares Traded", "")
sTemp = Replace(sTemp, "Turnover (Rs. Cr)", "")
If Left(sTemp, 2) = Chr(34) & Chr(34) Then
sTemp = Mid(sTemp, 3)
End If
Do While Left(sTemp, 3) = "," & Chr(34) & Chr(34)
sTemp = Mid(sTemp, 4)
Loop
If Left(sTemp, 1) = Chr(10) Then sTemp = Mid(sTemp, 2)
ReDim bArray(Len(sTemp) - 1)
Put #hFile, , arrURL(2, i) & "," & sTemp
Next i
Handler:
On Error Resume Next
Close #hFile
Set oXMLHTTP = Nothing
End Sub
Kindly help me in Hanldling errors . I want this code to be Re-Run when the out put has errors till all the quotes are filled.
Is it possible?
Thank you