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 text with no URL.
Link.Click
Exit For
End If
Next Link
Debug.Print NewURLHere.LocationURL
The URL i want is the url you get when u right click window - > properties, this link window does not have a url text bar.
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 text with no URL.
Link.Click
Exit For
End If
Next Link
Debug.Print NewURLHere.LocationURL
The URL i want is the url you get when u right click window - > properties, this link window does not have a url text bar.