Hi I was trying to validate a secured website using the URL in the following format https://username:password@host. When I run the site in browser it login and load the page automatically. But if I use =CheckURL(A1) in excel it says "The URL is invalid". Can someone help me with this please
This is the VBA code I use for validation
This is the VBA code I use for validation
VBA Code:
Public Function CheckURL(url As String)
Dim request As Object
Set request = CreateObject("Winhttp.WinhttpRequest.5.1")
On Error GoTo haveError
With request
.Open "HEAD", url
.Send
CheckURL = .Status & ": " & .statustext
End With
Exit Function
haveError:
CheckURL = Err.Number & ": " & Err.Description
End Function