+ Reply to Thread
Results 1 to 2 of 2

Open list of URL in Internet Explorer

  1. #1
    Registered User
    Join Date
    01-29-2016
    Location
    india
    MS-Off Ver
    ms office 2013
    Posts
    39

    Open list of URL in Internet Explorer

    Hi

    I have a list of URL in excel sheet ColumnA, I have to open each Url in Internet Explorer,copy the content of that page and paste it in active workbook in each sheet.

    please anyone help me to loop through url and copy paste.

    I am able open url and there is a data click button not able

    Private Sub CommandButton1_Click()
    'Dim IE As InternetExplorer
    Dim oW As Worksheet: Set oW = ThisWorkbook.Worksheets("Sheet1")
    Dim oEleCol As MSHTML.IHTMLElementCollection
    Dim oEle As MSHTML.IHTMLElement

    Dim btnGo As Object

    Set IE = CreateObject("InternetExplorer.Application")
    With IE
    ' Set IE
    .Visible = True

    'ShowWindow .hwnd, SW_SHOWMAXIMIZED

    ' Navigate to URL

    ' Wait for page to be ready
    While .Busy
    DoEvents 'wait until IE is done loading page.
    Wend

    '================================

    Set objButton = IE.Document.getElementById("h_filetype")
    objButton.Value = oW.Range("B2")
    .Document.getElementById("Date").Value = oW.Range("B3")
    .Document.getElementById("section").Value = oW.Range("B4")
    'IE.Document.forms(0).submit
    'IE.Document.getElementByTagName("getdata-button").Click
    End With
    'IE.Document.querySelector("input[src='/common/images/btn-get-data.gif']").Click

    Set allInputs = IE.Document.getElementsByTagName("input")
    For Each element In allInputs
    If element.getAttribute("src") = "/common/images/btn-get-data.gif" Then
    element.Click
    Exit For
    End If
    Next element
    Last edited by druva; 03-15-2020 at 01:00 PM. Reason: I added a code

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Open list of URL in Internet Explorer

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. open new tab in Internet Explorer
    By moosmahna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2017, 07:03 AM
  2. Macro to open Internet Explorer
    By Mr.India in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2015, 03:56 PM
  3. VBA to open internet explorer and in a new tab
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2014, 05:46 AM
  4. How do I open with Chrome and not Internet Explorer?
    By walterscj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2013, 11:13 AM
  5. Open internet Explorer and change settings
    By thadeus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2012, 07:16 AM
  6. Can't open an invisible Internet Explorer object
    By billiboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2010, 07:08 AM
  7. internet explorer not able to open site
    By Shelly in forum Excel General
    Replies: 1
    Last Post: 03-30-2006, 08:44 PM

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