Click to See Complete Forum and Search --> : upgrade code form IHTMLDocument to IHTMLDocument3


MIB
August 29th, 2001, 08:45 PM
Hello,
I did a code by using IHTMLDocument to atomatically insert value in the field as below:
Reference: MicroSoft Internet Controls & Microsoft HTML Object Library
Code:
Dim lvobjHTMLDocument As IHTMLDocument
Private mvobjInternetExplorer As InternetExplorer
Set mvobjInternetExplorer = New InternetExplorer
Set lvobjHTMLDocument = mvobjInternetExplorer.document
lvobjHTMLDocument.getElementsByName
("UserName").Item(0).Value = "MIB"

It works fine when I have IE5. But after I upgrade to IE5.5 this metod(
IHTMLDocument.getElementsByName
("string").Item(int).Value) won't work.

So I ave to declare
Dim lvobjHTMLDocument As "IHTMLDocument3"
but I can't use (IHTMLDocument.getElementsByName
("string").Item(int).Value) anymore..any suggestion?