shahin
Active Member
How to create my code using late-binding method so that I do not need to add any reference to the library? I tried with the below one but it doesn't seem to work. I know it has been discussed several times in several forums but it's hard to find them when in need. Any help on this will be highly appreciated.
This is what I tried:
I know what I did above is a clear mess. Please don't laugh at my ignorance.
This is what I tried:
Code:
Sub Late_Binding()
Dim html As Object, post As Object
With CreateObject("InternetExplorer.Application")
.Visible = True
.navigate "https://chandoo.org/forum/forums/vba-macros/"
Do Until .readyState = READYSTATE_COMPLETE: Loop
Set html = CreateObject("htmlfile")
Set html = .document
Set post = html.querySelector("h3 a[href*=help]")
MsgBox post.innerText
End With
End Sub
I know what I did above is a clear mess. Please don't laugh at my ignorance.
Last edited: