I am using Microsoft Office Professional Plus 2016, which breaks the code, prior to that Excel 2010 worked fine. Makes no logical sense. Also, I double checked, both are the 32-bit versions.
If I remove this portion of the code, it works but I need that portion of the script to pull in the effective date of the rates:
Dim L&
With CreateObject("WinHttp.WinHttpRequest.5.1")
.Open "GET", "https://www.wsj.com/market-data/bonds", False
.setRequestHeader "DNT", "1"
.send
If .Status = 200 Then
L = InStr(.responseText, "Rates shown are effective")
If L Then ActiveSheet.Range("A12") = Mid(.responseText, L, InStr(L, .responseText, "</") - L)
End If
End With
Bookmarks