Consulting

Results 1 to 1 of 1

Thread: Controlling pop-up IE windows

  1. #1

    Controlling pop-up IE windows

    Hi guys,
    I am writing a VBA to print a IE page.

    So i will open IE, navigate an url, then there is an img that when I click it, there will be a pop-up IE window, which I would like to print the pop up IE window, please help,


    Sub WebLogin()    
        Dim ie As Object
        Set ie = New InternetExplorerMedium
        With ie
            .Visible = True
            .navigate URL
            
            Do While .readyState <> 4 Or .Busy = True
                DoEvents
                .Visible = True
            Loop
        
            Set Inputcollection = .document.getElementsByTagName("img")
            For Each Inputtarget In Inputcollection
               If Inputtarget.ID = "popup" Then
                   Inputtarget.FireEvent "onclick"
                   Exit For
               End If
            Next Inputtarget
        
            'print the pop up IE
        
    
    
    
        End With
    End Sub

    Thank you

    Jack
    Last edited by jack4; 07-06-2017 at 02:52 AM.

Posting Permissions

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