Hi, I'm new to this Forum.
I'm using Excel 2013, Windows 10.
I'm trying to write a macro (VBA) to use WebService, but it continually errors with: Compile Error Sub or Function not defined.
I can get WebService to work on a Worksheet, by typing in cell B7 =NUMBERVALUE(WEBSERVICE("http://finance.yahoo.com/d/quotes.csv?s="&A1&",&f=l1&"))
Here's my simple Macro:
Sub Quote()
Sheets("Sheet1").Cells(7, "B") = NumberValue(WebService("http://finance.yahoo.com/d/quotes.csv?s=" & A1&, f = "l1&"))
End Sub
In cell A1 I have the stock symbol e.g. DLG.L
I wish the value defined by l1 (Current Price) to be put in cell B7.
Please keep your replies simple, as I'm fairly new to this.
Thank you.
Bookmarks