Hi, I am trying to extract the date into excel using VBA but getting stuck...any help would be appreciated
This is the relevant extract from the web page
<div>
<div class="daysTips">
<span>
"Start Date"
": "
"2018-08-24"
</span>
<span>...</span>
<span>...</span>
<span>...</span>
This is my non functioning code - probably a very simple change
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim Start As Date
Start = Trim(Doc.getElementsByClassName("daysTips")(0).innerText)
Range("Start_Date").Value = Start ' start date is an already defined name
This is the relevant extract from the web page
<div>
<div class="daysTips">
<span>
"Start Date"
": "
"2018-08-24"
</span>
<span>...</span>
<span>...</span>
<span>...</span>
This is my non functioning code - probably a very simple change
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim Start As Date
Start = Trim(Doc.getElementsByClassName("daysTips")(0).innerText)
Range("Start_Date").Value = Start ' start date is an already defined name