Using Msnstockquote from excel VBA

G

gary

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")
and I 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top