Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21178

Type mismatch error with createControlRange in W7 64-bit environment

$
0
0
I get a "type mismatch" error when executing the following (simplyfied) VB6 code in W7 64-bit:

Dim ele As IHTMLElement, pCR As IHTMLControlRange

Set pCR = ie.document.body.createControlRange()

Call pCR.Add(ele)

Running under W7 32-bit or Windows XP the program runs perfect end gives no error.

If I dimension the pCR variable to "Object", the program accepts the createControlRange, but gives an error 483: "object doesnt support this property or method".

Is there any solution or bypass for this problem?

Viewing all articles
Browse latest Browse all 21178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>