Results 1 to 5 of 5

Internet Explorer Macro Automation

Threaded View

  1. #1
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Internet Explorer Macro Automation

    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.
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-14-2013 at 07:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1