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