J. Scott Elblein
Well-known member
I have this declared up top.
And this function.
on the "OldDocument" lines, I get the error "option strict disallows late binding" when I have Option strict on. How do I fix this?
VB.NET:
Public oldDocument As mshtml.IHTMLDocument
And this function.
VB.NET:
Public Function GetFocusedElement() As mshtml.IHTMLElement
Dim focusedElement As mshtml.IHTMLElement = Nothing
If oldDocument.selection.type,mshtml. = "None" Then
focusedElement = CType(oldDocument.selection.createRange(), mshtml.IHTMLTxtRange).parentElement
ElseIf oldDocument.selection.type = "Control" Then
focusedElement = CType(oldDocument.selection.createRange(), mshtml.IHTMLControlRange).item(0)
End If
Return focusedElement
End Function
on the "OldDocument" lines, I get the error "option strict disallows late binding" when I have Option strict on. How do I fix this?