Hi there. Your tutorials are great. May I ask you what should I write into the code of your Macro named "Get Web Data" to Put Data into a Worksheet instead of "Output the price into a message box".
Thanks in advance
Hi there. Your tutorials are great. May I ask you what should I write into the code of your Macro named "Get Web Data" to Put Data into a Worksheet instead of "Output the price into a message box".
Thanks in advance
Hi bng01 and welcome to the Forum.
I agree that Don's tutorials are great. If you're referring to the macro Get_Web_Data which gets data from Yahoo, it ends with a MsgBox statement (after the line "price = html.getElementsByClassName(...") but you can simply replace the MsgBox line with something like:
Sheet1.Range("B2") = price
(givn "price was defined by the preceding line). That will put the value into cell B2. Change the cell ref (in bold above) to move it elsewhere then add info in an adjacent cell to identify what that value is. You might also like to "timestamp" the value's retrieval by adding a second line like:Sheet1.Range("C2") = Now
which will put the current date and time in that cell. You may have to resize the cell to see it.
Hope this suits your purposes.