CancelLoad on HTMLViewer issue on Windows 7

Hi Everyone!

I’m experimenting issues with HTMLViewer (CancelLoad event). Sometime ago I use a code get back Javascript Variables in windows avoiding the lag produced with “Window.title or window.status method”, this is the code:

The code that I use on a button (Sent variables):

Dim GetInvoiceKind As String= "InvoiceKind();" _ +"var TipoFactura;"_ +"function InvoiceKind() {" _ +"TipoFactura = document.getElementsByTagName('h2')[0].innerHTML.trim();" _ +"window.location = 'holanene' + TipoFactura;" _ +"}" HTMLViewer1.ExecuteJavaScript(GetInvoiceKind)

The code that I use on CancelLoad event (Receive variables):

if instr(URL,"holanene") > 0 then dim theURLString as string theURLString = DefineEncoding(DecodeURLComponent(URL), Encodings.UTF8 ) dim jsnene() as string = split(theURLString,"holanene") VariableTitulo = Replaceall(jsnene(1),";",EndOfLine) Msgbox VariableTitulo return true end if

It works very Fine on Windows 8, Windows 8.1, Windows 10 on X86 and X64 flavors.

But when I run it on Windows 7 I got an OleException error.

What Am I doing wrong?