PDA

View Full Version : Parsen/Scripting web-pages with Excel-VBA - no refresh data



2000ede
05-22-2018, 06:17 AM
Hello from Germany!

I need your help!
With the following code I load html content into a variable.
It works very well - but with a catch - it does not pick up new information until I close Excel once.
If I leave Excel open, I got the last out of a cache. How can I tell him that he picks it up "fresh"? Many thanks for your help!

URL = "https://www.uni-oldenburg.de/dez4/wetter/ausgabe.php?datei=wetter1805.txt"
With CreateObject("MSXML2.XMLHTTP")
.Open "get", URL, 0
.send
00 = .responseText
End With

mancubus
05-23-2018, 07:58 AM
welcome to the forum.
check this out:
https://www.tek-tips.com/viewthread.cfm?qid=1563400

2000ede
05-24-2018, 02:40 AM
Thank you. I have found the solution:

Private Declare Function DeleteUrlCacheEntry Lib "wininet.dll" Alias "DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long