Using Msnstockquote from excel VBA
I am able to load a cell in an Excel spreadsheet with something like
=MSNStockQuote("msft","Last Price","US")
However, I would like to load a variable in a VBA module with something like:
curPrice = MSNStockQuote("msft","Last Price","US")
butI get âVariable Not Definedâ even though curPrice is defined.
I also tried unsuccessfully with:
curPrice = MSNStockQuote.Functions.MSNStockQuote("msft", "Last Price", "US")
How do I call the MSNStockQuote function from within a VBA module. ?
And is it possible to use this call to return more than one parameter at a time,. Say I wanted Price and time of day as well. Can I do this with a single Function call?
Thanks,
Gary
|