+ Reply to Thread
Results 1 to 4 of 4

Help in scraping data from website

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    104

    Help in scraping data from website

    Hello,

    I am trying to scrape data from a public website with VBA. From Excel, I first load Internet Explorer to a specific website, enter my search value, choose the proper bullet button and click on the search button. All this is working fine.

    My problem is that I was not successful in finding the proper hyperlink name in the source code of the webpage and therefore I am unable to have VBA click on it to reach the final webpage I want where I would like to copy information to Excel.

    The hyperlink I would like to click is the first search results that appears, in my example it is named: Various Clerical positions, Winnipeg Tax Centre, Winnipeg, MB (Open to the General Public) (Amended)

    I am including the VBA code below. The code is working and is currently clicking on the Contact us hyperlink but this is not the hyperlink that I would like to click on. FYI, I added as references (Tools menu, then references…) the Microsoft HTML Object Library + Microsoft Internet Controls.

    Thank you in advance for your time.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Help in scraping data from website

    Change the Contact Us If statement to:
    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help in scraping data from website

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Ottawa, Ontario
    MS-Off Ver
    Excel 2013
    Posts
    104

    Re: Help in scraping data from website

    Thank you ABB33 and Chippy. Both solution worked but I ended up using ABB33 solution because when there was 2 results, ABB33 solution click on the first one as Chippy clicked on the 2nd. Thanks again for your time, will mark as solved.

+ 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. Trouble Scraping data from a website
    By chrisellis250 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-13-2017, 09:07 AM
  2. Cleaning up data from scraping website URL
    By king0r1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2016, 08:42 AM
  3. [SOLVED] Scraping data from website
    By novicevba in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2016, 11:02 AM
  4. Data Scraping from the WebSite
    By sathis in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-26-2015, 10:46 AM
  5. problem while scraping data from website
    By dps700 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2014, 09:46 AM
  6. scraping data from a website
    By redpanda in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-05-2012, 01:20 PM
  7. Scraping website data into Excel
    By oliver79 in forum Excel General
    Replies: 0
    Last Post: 06-13-2010, 02:15 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