![]() ![]() ' Get the price from the specified element on the page. ' Put the webpage into an html object to make data references easier. Response = StrConv(request.responseBody, vbUnicode) ' Get the webpage response data into a variable. tRequestHeader "If-Modified-Since", "Sat, 00:00:00 GMT" ' Where to go and how to go there - probably don't need to change this. Set request = CreateObject("MSXML2.XMLHTTP") ' Create the object that will make the webpage request. PRICES is a Range which contains PRICE1,2,3 Private Sub Worksheet_SelectionChange(ByVal Target As Range) PRICE1,2,3 are the cells where the prices will appear. NEV is the cell where the name or price or whatever will appear. URL is the cell you need to paste a url in Rename cells in the top left corner, under the toolbar. When excel is open press Alt+F11 to open VBA and paste this code in.īut before that go to Tools>References and tick these:Īlso when referring to named Ranges like Range("URL") make sure you actually have a cell that is named URL. ![]() My main source was this video and a bunch of googling to modify it for my purpose. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |