Hi All,
I’m trying to figure out how to have a macro bring up this website (an internal document website) reference the first frame (red) (frameSearchCriteria) uncheck the “My Loans Only” box (“xMyContainers”), Enter in a Loan Number (“xObjectSearchValue”) and click search (id=”xSearchSubmit”), then jump to the second frame (blue) (“frameSearchResults”) and click that row that starts with the loan number (“xRowClickAction”) which opens another window. i’ve started most of it, but it doesn’t seem to be doing anything. I'm curious if referencing specific frame names or forms would help and it also looks like the "Loan Number" field has multiple names to it, not sure if that has something to do with it. i've tried attaching the html and a snip of the website however the attachments dont seem to be working. i will keeping attempting to post those. as always the help is greatly appreciated!
Sub Xdoc()
Dim oIE As InternetExplorer
Dim HTMLDoc As HTMLDocument
Dim frmCol As FramesCollection
Dim htmlColl As Object
Dim htmlInput As Object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate ("http://imaging/xsuite/xapps/default.aspx")
Do While oIE.Busy: DoEvents: Loop
Do While oIE.readyState <> 4: DoEvents: Loop
oIE.Visible = True
' Go through <frame> to get to main document
Set frmCol = oIE.document.frames 'Get the frame collection
Set HTMLDoc = frmCol.Item(1).document 'Get the HTML document within the frame
Set htmlColl = HTMLDoc.getElementsByName("xMyContainers") 'Get the input collection from this HTML doc
For Each htmlInput In htmlColl
If htmlInput.Name = "xMyContainers" Then htmlInput.Value = ("0")
Next htmlInput
Set htmlColl = HTMLDoc.getElementsByName("xObjectSearchValue") 'Get the input collection from this HTML doc
For Each htmlInput In htmlColl
If htmlInput.Name = "xObjectSearchValue" Then htmlInput.Value = ("4213010634")
Next htmlInput
Set htmlColl = HTMLDoc.getElementsByName("Search") 'Get the input collection from this HTML doc
For Each htmlInput In htmlColl
If htmlInput.Name = "Search" Then htmlInput.Click
Next htmlInput
Do While oIE.Busy: DoEvents: Loop
Do While oIE.readyState <> 4: DoEvents: Loop
Set oIE = Nothing
End Sub
See Attached for HTML and screen snip, sorry if the highlighting on the screen shot is a bit messy.
Bookmarks