rutgermons
asked on
dealing with windows popups
folks
I have a macro code that queries web urls if they are up or not, however some of them have certificate mismatches and when the macro runs the end user using excel needs to confirm the windows security alerts, how can I build code into the macro to say yes and confirm all popups ?, would be glad for your thoughts
Sub GetStatus(ByVal Ref As String)
Dim HttpReq As Object
Dim Rslt As Variant
Set HttpReq = CreateObject("MSXML2.XMLHT TP")
On Error Resume Next
With HttpReq
.Open "GET", ActiveSheet.Range(Ref).Val ue, False
.Send
If Err Then
Rslt = "No connection"
Else
Rslt = Val(.Status)
If Err Then
Rslt = "No Response"
Else
Rslt = "Status: " & Rslt
End If
End If
End With
ActiveSheet.Range(Ref).Off set(0, 1).Value = Rslt
ActiveSheet.Range(Ref).Off set(0, 2).Value = Now()
End Sub
I have a macro code that queries web urls if they are up or not, however some of them have certificate mismatches and when the macro runs the end user using excel needs to confirm the windows security alerts, how can I build code into the macro to say yes and confirm all popups ?, would be glad for your thoughts
Sub GetStatus(ByVal Ref As String)
Dim HttpReq As Object
Dim Rslt As Variant
Set HttpReq = CreateObject("MSXML2.XMLHT
On Error Resume Next
With HttpReq
.Open "GET", ActiveSheet.Range(Ref).Val
.Send
If Err Then
Rslt = "No connection"
Else
Rslt = Val(.Status)
If Err Then
Rslt = "No Response"
Else
Rslt = "Status: " & Rslt
End If
End If
End With
ActiveSheet.Range(Ref).Off
ActiveSheet.Range(Ref).Off
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers Rob, seems to work, is this a standard code to ignore bad certs?
They are options for that COM object:
http://msdn.microsoft.com/en-us/library/ms763811(v=vs.85).aspx
Thanks for the grade.
Regards,
Rob.
http://msdn.microsoft.com/en-us/library/ms763811(v=vs.85).aspx
Thanks for the grade.
Regards,
Rob.
ASKER
thanks
<link removed - GaryC123 TA>
Be aware there are differences between IE7 and earlier versions versus IE8 and later versions on how to do this. Follow the steps to the letter and you will nail this issue down. No code required.