View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Gary is offline
external usenet poster
 
Posts: 273
Default 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")
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