Trying to run this code to work with an already open IE web page. I can step through the code with no errors but it never sends the data from the excel cells over to the web page. (it does find the correct open page my_title)
Any advice wold be greatly appreciated.
Any advice wold be greatly appreciated.
HTML:
Sub GetSofteon()
marker = 0Set objShell = CreateObject("Shell.Application")IE_count = objShell.Windows.CountFor x = 0 To (IE_count - 1) On Error Resume Next ' sometimes more web pages are counted than are open my_url = objShell.Windows(x).****************** my_title = objShell.Windows(x).Document.Title
If my_title Like "ScFlex" & "*" Then 'compare to find if the desired web page is already open Set IE = objShell.Windows(x) marker = 1 Exit For Else End IfNext
DoDoEvents
Loop Until IE.ReadyState = 4
IE.Document.All("txtFromDate").Value = ThisWorkbook.Sheets("sheet1").Range("c2")IE.Document.All("txtBldgID").Value = ThisWorkbook.Sheets("sheet1").Range("a2")IE.Document.All("txtsku").Value = ThisWorkbook.Sheets("sheet1").Range("b2")
IE.Document.GetElementByID("btnQuery").Click
MsgBox ("run complete")
End Sub