I am using Excel 2016 as a means to capture data from a piece of equipment that has a web IP address/USB port. If I use a web browser, the URL would be http://127.0.0.1:44789/evox/bacnet/2/0/51/117 and would get back a response <int< font=""> xmlns:trane="</int<>trane:evox" href="/evox/bacnet/2/0/51/117" val="64"/>
The val represents °F
I use Excel to loop through many different points and verify the point are working. Then we change the units on the equipment from Imperial to SI (metric) and recheck to make sure the equipment response in the correct units.
Excel appears to look at memory and not get the new information. It shows the old value.
If I do it with a web page (chrome or IE) it is correct.
If I close Excel and reopen it and will get the updated information.
My question is how do I get Excel to not use what is cached and get a fresh value
The val represents °F
I use Excel to loop through many different points and verify the point are working. Then we change the units on the equipment from Imperial to SI (metric) and recheck to make sure the equipment response in the correct units.
Excel appears to look at memory and not get the new information. It shows the old value.
If I do it with a web page (chrome or IE) it is correct.
If I close Excel and reopen it and will get the updated information.
My question is how do I get Excel to not use what is cached and get a fresh value
Rich (BB code):
Rich (BB code):
Public Sub Looping()
Dim xmlhttp As New MSXML2.xmlhttp, myurl As String, xmlresponse As New DOMDocument
On Error GoTo ErrorHandler1
For Each cell In Range("D90:D200")
If Not IsEmpty(cell.Value) And cell.Value = "Pause" Then
MsgBox ("In Tracer TU, Utilities - Controller - Controller Settings - Protocol, change the units, then click OK")
ElseIf Not IsEmpty(cell.Value) And cell.Value = "Pause1" Then
msgboxResult = MsgBox("Did the Unit change?", vbYesNo)
If msgboxResult = vbNo Then Exit Sub
ElseIf Not IsEmpty(cell.Value) Then
myurl = cell.Value
xmlhttp.Open "GET", myurl, False
xmlhttp.send
xmlresponse.LoadXML (xmlhttp.responseText)
strRet = xmlhttp.responseText
StrOut = Right(strRet, Len(strRet) - 40)
cell.Offset(0, 1).Value = StrOut
End If
Next
ErrorHandler1:
StrOut = ""
Resume Next
End Sub