Browser connects to page: ie.ReadyState = READYSTATE_COMPLETE.This is my understanding of the timeline for loading a page with an IE control. I'm pretty sure your problem is being caused by attempting to access the document before it's completely loaded. Object variable or with block variable not set.Īny suggestion why my statement does not work? I am trying to get the product description by using productDesc = Docx.getElementsB圜lassName("productDescriptionWrapper")(0).innerText. ThisWorkbook.Worksheets(1).Range("D" & RcdNum) = price 'ThisWorkbook.Worksheets(1).Range("C" & RcdNum) = productDesc ThisWorkbook.Worksheets(1).Range("B" & RcdNum) = productTitle Price = Docx.getElementById("priceblock_ourprice").innerText 'productDesc = Docx.getElementsB圜lassName("productDescriptionWrapper")(0).innerText ProductTitle = Docx.getElementById("productTitle").innerText WebURL = ThisWorkbook.Worksheets(1).Range("A" & RcdNum)ĭo Until Ie.ReadyState = READYSTATE_COMPLETE However, I would also like to have the product description.įor RcdNum = 2 To ThisWorkbook.Worksheets(1).Range("A65536").End(xlUp).Row I put the link into column A and get the other fields in the respective columns, f.ex.: I am want to scrap from amazon some fields.Ītm I am using a link and my vba script returns me name and price.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |