|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- 作业1:Sub test()
- Dim Url$, StrRes$
- Url = "http://www.pinble.com/LotteryOneList.aspx?type=59DAE47BC0A467C82C20144B4C19F18E89DA39CC782A9811&class=%E5%90%84%E7%9C%81%E4%BD%93%E5%BD%A9&name=%E6%B1%9F%E8%8B%8F%E4%B8%83%E6%98%9F%E5%BD%A9"
- With CreateObject("WinHttp.WinHttpRequest.5.1")
- .Open "GET", Url, False
- .SetRequestHeader "Referer", "http://www.pinble.com/Lottery.htm"
- .Send
-
- StrRes = .Responsetext
-
- Open ThisWorkbook.Path & "\Res.txt" For Output As #1
- Print #1, StrRes
- Close #1
-
- End With
- End Sub
复制代码 |
|