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.
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".Set ie = CreateObject("InternetExplorer.Application") ie.Visible = True ie.navigate "http://www.google.com/"
Thank you for your help.
Last edited by lundawg; 08-09-2011 at 03:15 PM.
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 Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
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.
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.
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 Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
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.
Hello lundawg,
Your browser will automatically follow the link on a left click by design. You can not over-ride this using VBA.
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 Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Thank you for your effort, Leith Ross.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks