+ Reply to Thread
Results 1 to 7 of 7

Internet Explorer Extraction on Click

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Internet Explorer Extraction on Click

    Hello,

    I am attempting to extract information from a website once I click a certain link. What I would like to do is manually click a link and extract the text in the link and the address of the link. I have no trouble navigating to the webpage I want. My code is posted below using google as the website.

    Please Login or Register  to view this content.
    As an example, once the page is open I would like to manually click a link such as "Images" at the top left. At this point, the macro should store the text "Images" and the google images address "http://www.google.com/imghp?hl=en&tab=wi".

    Thank you for your help.
    Last edited by lundawg; 08-09-2011 at 03:15 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Internet Explorer Extraction on Click

    Hello lundawg,

    Welcome to the Forum!

    Can you provide a more detailed example of what you want to do?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-09-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Internet Explorer Extraction on Click

    Thank you for your response, Leith Ross.

    I'm attempting to write a macro that includes first automatically navigating to a website (with a new window), then allowing me to manually click on a link. Upon clicking the link, I will get two pieces of data. One will be the name of the link. The other will be the address behind the link. For example, if I were to navigate to the google homepage and I wanted the data corresponding to the "Images" link at the top left, the name of the link would be "Images" and the address behind the link would be "http://www.google.com/imghp". I will then use these two pieces of data in a userform to populate a spreadsheet, but I am not having trouble with that part.

    Any ideas? Thanks again for your help.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Internet Explorer Extraction on Click

    Hello lundawg,

    If you are do this manually then simply Right-Click the link and use the context menu to return the link address or copy it to the clipboard.

  5. #5
    Registered User
    Join Date
    08-09-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Internet Explorer Extraction on Click

    I'd like to do it with a single left-click if it is possible. If you do not have the correct answer, I understand.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Internet Explorer Extraction on Click

    Hello lundawg,

    Your browser will automatically follow the link on a left click by design. You can not over-ride this using VBA.

  7. #7
    Registered User
    Join Date
    08-09-2011
    Location
    Los Angeles, California
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Internet Explorer Extraction on Click

    Thank you for your effort, Leith Ross.

+ Reply to Thread

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