PDA

View Full Version : [SOLVED:] Add-in for stock price update



msmith
09-13-2005, 09:33 PM
Hey all-

I am using the MSN stock Quote Add-in from:
http://www.microsoft.com/downloads/details.aspx?FamilyID=485FCCD8-9305-4535-B939-3BF0A740A9B1&displaylang=EN

I'm not sure if this is a good one to use but will take any suggestions at this point.

Ultimately, what I would like to do is run a macro that that will track stock prices in a portfolio over a period of time. I have enough knowledge to get the code for adding in new data to a certain cell range to track changes over time. I don't know how to call the Add-in feature that updates the stock quotes. Is this even possbile within a macro? I don't have knowledge on how to call add-ins. The update works if I just hit the button but then I have to do manual copy and paste(s) to get the data where I want. I would like to automate this.

Thanks in advance,

Mark

Cyberdude
09-14-2005, 10:53 AM
Hey, Mark, I don't have an answer to your question, but I wanted to comment that I've been downloading closing stock prices from Yahoo Financial for about 10 years now, and, while not completely automatic, I have macros to handle all the work once I download the data. I set up portfolios in Yahoo, then I click on their download button and they stick the data in ".csv" files for me. Then I use macros to extract the data and put it where I want it. The manual part of it is going into Yahoo FInancial and clicking the download button for each of my four portfolios. It takes me maybe 3 to 5 minutes (I always get distracted once I'm there), but it's not much effort. If you are trying to get realtime quotes, then this wouldn't work for you because of their 20-minute delay. I'm usually just interested in the closings. Otherwise I go into Ameritrade and user their streamer facility, which is super cool. http://vbaexpress.com/forum/images/smilies/039.gif

xXLdev
09-14-2005, 05:43 PM
Here is something I wrote years ago. It uses a web query to update the price quotes.

The Summary sheet contains your portfolio data. The web query uses the stocks symbols here. Press "Quotes" button to update the values. You can add or delete rows and enter new symbols. Do not delete the $INX row or the blank row above TOTALS.


The Quotes sheet contains the web query.

I hope this helps. See attachment for the code.

msmith
09-16-2005, 08:36 AM
Thanks for the suggestions guys. Now it works!

Mark