I wrote a VBA code which would take its input(url) from a column of an excel sheet, and return its http status code. The problem I face is that some urls are having Certificate issues and for some websites I am getting Windows Security Alerts. I want a simple solution to automatically click on Yes for all these alerts (if they come at all) as these sites are comletely trusted. I am attaching the the code which checks for the status code.
    `'Takes input url as String and return the status(200 is up ,rest all are down)
     Function urlCheck(url As String) As Integer
     On Error GoTo error_help
     Dim http: Set http = CreateObject("MSXML2.XMLHTTP")
     http.Open "GET", url, False
     http.Send
     If (Not http.Status = 200) Then
     urlCheck = http.Status
     Else
     urlCheck = http.Status
     End If
     error_help:
     'MsgBox "error"
     End Function
`
I have already tried Application.DisplayAlerts = False , it doesn't work
