I am trying the following code
Sub myConSP()
Dim oHtmlSP As HTMLDocument
Dim tSPIndex As HTMLDivElement
Dim tSPIdx As HTMLDivElement
Dim tables As Object
Set oHtmlSP = New HTMLDocument
With CreateObject("WINHTTP.WinHTTPRequest.5.1")
.Open "GET", "C:\Users\Future\Desktop\Test.html", False
.send
oHtmlSP.body.innerHTML = .responseText
End With
Set tables = oHtmlSP.querySelectorAll("table[width='100%'] table:first-child")
Debug.Print tables.Length
End Sub
I tried different ways to read the HTML local file through that code. How can I refer to the local file HTML file in such a code?