jimwal0367
Programmer
Just changed from VB6 to VB2008.
After some investigation, I have found that IE8, has changed regarding GetElementById and GetElementsByName.
My old VB6 code used to bind to certain places on a webpage, using this code
HTMLDOC = objIE.document.getElementById("mainframe")
But IE8 is case sensitive and the actual name of the Frame is not Frame ID but Frame name.
So I changed my code to reflect this to
HTMLDOC = objIE.getElementsByName("mainFrame")
But on running my code HTMLDOC equals nothing.
Declarations as follows:
Dim objie as Object
Dim HTMLDOC As mshtml.HTMLDocument.
Code I am trying to run:
objIE = oWin
HTMLDOC = objIE.getElementsByName("mainFrame")
Any ideas why HTMLDOC is not binding to the frame
After some investigation, I have found that IE8, has changed regarding GetElementById and GetElementsByName.
My old VB6 code used to bind to certain places on a webpage, using this code
HTMLDOC = objIE.document.getElementById("mainframe")
But IE8 is case sensitive and the actual name of the Frame is not Frame ID but Frame name.
So I changed my code to reflect this to
HTMLDOC = objIE.getElementsByName("mainFrame")
But on running my code HTMLDOC equals nothing.
Declarations as follows:
Dim objie as Object
Dim HTMLDOC As mshtml.HTMLDocument.
Code I am trying to run:
objIE = oWin
HTMLDOC = objIE.getElementsByName("mainFrame")
Any ideas why HTMLDOC is not binding to the frame