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>
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: