Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get URL path after Clicking on Link

Status
Not open for further replies.

krieg313

Technical User
May 5, 2011
22
0
0
US
Well the title says it all, how would i get the url of the link i just clicked?

Dim ObjForTesting As Object
Dim Link As Object
Dim ElementCol As Object

Set ObjForTesting = CreateObject("InternetExplorer.Application")
With ObjForTesting
.Visible = True
.navigate "While .Busy
DoEvents
DoEvents
Wend
End With

Set ElementCol = ObjForTesting.Document.getElementsByTagName("a")

For Each Link In ElementCol
If Link.innerHTML = "S0002" Then
Link.Click
Exit For
End If
Next Link
Debug.Print NewURLHere.LocationURL
 
Anyone home?
I guess everyone's on vacation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top