PDA

View Full Version : Open web Page and clink on a link within the page



gtg430i
02-06-2011, 03:20 PM
Hi - This is the first time I post in this forum. I really need urgent help, I am struggling.

I am sure my post and questions had been answered before, but still cant figure it out, maybe by posting my code and somebody modifies it to fit my need.

As the title explains I need to click on a link within a webpage.

As an example say I need to click on the word "Health" within YAHOO. I have the code below:

Private Sub DrawingIn_Click()

Set browser = CreateObject("InternetExplorer.Application")
browser.Navigate ("YAHOO PAGE")
browser.StatusBar = False
browser.Toolbar = False
browser.Visible = True
browser.Resizable = False
browser.AddressBar = False

What lines of codes do I need to clck on the "Health" ?

P.S I am using Excel 2007.

Thank you very much.

JP2112
02-07-2011, 08:35 AM
Why not just navigate directly to the Health page?

browser.navigate "http://health.yahoo.net/"