Hi Excel VBA community-

I'm a newbie for the most part but I try to learn building blocks as new needs come up, I haven't posted in a while. The below code is my attempt to modify something i have done in the past, but clearly i didn't fully understand what i have tried to modify. Essentially I have a list of tickers and I was able to find someone who figured out an api/url structure for a particular website i use such that as you change certain parameters it will download a set of data in csv given the inputs. example -

http://financials.morningstar.com/aj...ear=5&number=3

each value after the "=" is a parameter in this case TWTR is the ticker and the others will remain static during the loop process. I'll likely develop a dashboard so that users can toggle the other options before running the macro. I'm thinking I'll just declare these as variables and concatenate in the code at some point. but that's not may main concern right now.

Basically I want to loop through a list of tickers starting in A2. Since the list will be constantly changing in terms of content and dimensions, the macro i want to develop needs to test each time the range dimension of the list i want it to loop through. Ideally I'd like to have each of the csv files be created as a new tab then erased/replaced when the macro is run again. If I can't get everything to save as a new tab in the same excel file- knowing how to save each download to a specified directory would also be helpful (another building block for something else i'm working on). in general the ticker lists will be >100 and < 200 but not strictly.

any suggestions or things I should focus on mastering?
Please Login or Register  to view this content.