I'm trying to setup an workbook that will check the current status of a website (URL RETURN CODE 200) using a Public Function. While I found an example of one that seems to work like a charm, I'm not sure how it is being triggered and how to "refresh" it.
Does this automatically check so often or does it simply trigger on open/data refresh?
Thanks in advance for any insight.
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
End With
Exit Function
haveError:
CheckURL = Err.Description
End Function
Does this automatically check so often or does it simply trigger on open/data refresh?
Thanks in advance for any insight.