Hello all,
I have been tinkering with getting a .csv file to download by using VBA. The location of the information is here:

http://finviz.com/screener.ashx?v=15...43,44,45,46,65

This is a stock screener that allows me to set a few filters before downloading. I am focusing on relative performance.

If you go to the link and scroll to the bottom of the page,you will notice that the there is actually more than one page of data. This means that using Get External Data/From Web only gives me some of the information, i.e. that which is on the visible table.

In the lower right corner there is an "Export" button. This allows me to export the entirety of the screened information regardless of how many pages it is. I generally don't know how many pages there would be for a given screen. I have tried opening the export in a different tab or window so that I could direct the code to retrieve the information from that url. However, that url is the same as the one above and does not include a .csv extension.

When you click on it in IE it gives you the option to Save or Open. If you choose Save, it saves as a .csv named finviz. If you choose Open it opens a .csv named finviz.

I believe I can manipulate the data the way I want if I can get the code to retrieve the information. Inspecting the element for the Export button yields the code:

<a class="tab-link" href="export.ashx?v=152&amp;f=sec_healthcare,sh_avgvol_o500,sh_opt_optionshort,sh_price_o10&amp;ft=4">export</a>

I think this is the key to making this work, but I am not sure how to do this. Let me know if additional information is needed.

Thanks in advance!