Hello all I'm trying to get this function to work.
I created a function to check the validity of URL in VBA.
I try to run it and get a compile error. Any help thanks!
![]()
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 End Function haveError: CheckURL -Err.Description End Function
Bookmarks