D Dennis Tucker Jul 7, 2009 #1 Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis
Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis
T Tim Williams Jul 7, 2009 #2 If you can get a reference to the root HTMLDocument object then you can use that to reach the appropriate child elements' focus() method Eg: for a text input with Id or Name of "txtFocus" doc.getElementById("txtInput").focus or doc.getElementsByName("txtInput")(1).focus For plenty of examples on how to get a reference to the Document object, Google on "automate IE VB[A]" Tim Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis
If you can get a reference to the root HTMLDocument object then you can use that to reach the appropriate child elements' focus() method Eg: for a text input with Id or Name of "txtFocus" doc.getElementById("txtInput").focus or doc.getElementsByName("txtInput")(1).focus For plenty of examples on how to get a reference to the Document object, Google on "automate IE VB[A]" Tim Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis
D Dennis Tucker Jul 7, 2009 #3 I do have this access. I think this is what I was looking for. I will try it out. Thank you so much. Dennis If you can get a reference to the root HTMLDocument object then you can use that to reach the appropriate child elements' focus() method Eg: for a text input with Id or Name of "txtFocus" doc.getElementById("txtInput").focus or doc.getElementsByName("txtInput")(1).focus For plenty of examples on how to get a reference to the Document object, Google on "automate IE VB[A]" Tim Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis
I do have this access. I think this is what I was looking for. I will try it out. Thank you so much. Dennis If you can get a reference to the root HTMLDocument object then you can use that to reach the appropriate child elements' focus() method Eg: for a text input with Id or Name of "txtFocus" doc.getElementById("txtInput").focus or doc.getElementsByName("txtInput")(1).focus For plenty of examples on how to get a reference to the Document object, Google on "automate IE VB[A]" Tim Is there any way to move the focus around on a web form from VBA - Excluding "SendKeys {TAB}"??? Dennis