How to Click a Hyperlink on webpage

sugaprasad

New Member
Joined
Sep 4, 2013
Messages
9
Hi Everyone,

I am trying to open a hyperlink from a webpage. But my code doesn't work. can someone please help me how to click on hyperlink in a webpage

here is my code.


<CODE style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 12px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: monospace; PADDING-TOP: 0px">Sub Fill_Website_Textbox()

Dim objIE As SHDocVw.InternetExplorer
Dim OrgBox As HTMLInputElement
Dim objButton As HTMLButtonElement
Dim objLink As HTMLLinkElement

Set objIE = New SHDocVw.InternetExplorer
objIE.navigate "http://xxxxxxxxxxxxxxxxxxxxxxxxx"
objIE.Visible = True
Do While objIE.readyState < 4: Loop

Set OrgBox = objIE.document.getElementById("dDocName")
OrgBox.Value = "2023145"

Set objButton = objIE.document.getElementById("miniSearch")
objButton.Click

Application.Wait (Now + TimeValue("0:00:05"))

Set objLink = objIE.document.getElementById("column_0_2")
objLink.Click ' code simply skipping without doing any action

End Sub</CODE>
</PRE>​




</PRE>
have i declared the objLink correctly. please help me
 
Last edited:

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top