xmlhttprequest - VBA - request timeout when open link with WinHttp.WinHttpRequest.5.1 -
i tried open link vba , want save response (in csv format) local drive. code, set timeout still showing request timeout error message @ "send" code. if open link browser, automatically download csv file. idea? thanks!
dim xml object set xml = createobject("winhttp.winhttprequest.5.1") xml .open "get", "https://hq.appsflyer.com/abcdefg", false .settimeouts 0, 60000, 120000, 120000 .send end if xml.status = 200 set ostream = createobject("adodb.stream") ostream.open ostream.type = 1 ostream.write xml.responsetext ostream.savetofile ("d:\appsflyer.csv") ostream.close end if
Comments
Post a Comment