I recently posted a thread with the same name. The reason why I'm using the same name again, is because I didn't know how to "UNSOLVE" the other thread. Well enough about that.
For you that remembers my last thread, I needed to create a macro that opened a internet site, inserted username and password and extracted the stockprices from my portefolio.
Further I needed the macro to automatically get the stock prices each night at 23.59 without doing anything. It does the job, but now I've encountered a new problem.
I use static references which means that the macro is "screwed up" everytime I buy or sell a stock, so I tried to use the loop formula, but I can't get it to work. Is there another way to solve this problem or am I using the loop formula in a wrong way? Thank You very much for all responses.
As you can see from the code below I dim 5 variables (which means I can only have 5 stocks in my portfolio before I have to write more code). I figured it should be a way to loop between the "tr's" and get the right values no matter how many stocks I buy or sell.
Best regards
Thomas
Bookmarks