VBA/Excel/Access/Word/File Path/WinHttpRequest

Материал из VB Эксперт
Перейти к: навигация, поиск

WinHttpRequest Demo

 
Sub QuerybyAuthor()
    Dim ws As Worksheet
    Dim whr As New WinHttpRequest
    Dim lobj As ListObject
    Dim nCount As Integer
    Dim objSelected As Object
    Dim sURI As String
    Set objSelected = Selection
    Set ws = Worksheets("Sheet1")
    Set lobj = ws.ListObjects(1)
    Application.Cursor = xlWait
    sURI = "http://xml.amazon.ru/"
    whr.Open "GET", sURI
    whr.Send
    ActiveWorkbook.XmlMaps(1).ImportXml whr.ResponseText
    Application.Cursor = xlDefault
End Sub