Dim IE as object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate App.Path & "\pageofinterest.htm"
This works:
IE.Document.All("visitdate").Value = SomeValue
This doesn't !
Dim inputname as string
inputname = "visitdate"
IE.Document.All.Item(inputname).Value = SomeValue
Is there any way I can update the text boxes and lists using names
stored in an array or collection?
Thanks,
Mike
The "All.Item" syntax returns a collection of items rather than an
individual item. You would need to assign final value to the individual
items in the collection:
[warning - air code]
Dim strInName as String
Dim objCollect as Object
Dim objItem as Object
strInName = "visitdate"
Set objCollect = IE.Document.All.Item(strInName)
For Each objItem in objCollect
objItem.Value = "Whatever"
Next
Thanks for the post. I found this approach that works for text boxes,
selects, and more:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20660197.html
Mike