Gehe zu deutscher Webseite

ViaThinkSoft CodeLib

This article is in:
CodeLibProgramming aidsVisual Basic for Applications (VBA)


Sub test()
    Dim RespArray() As String
    Dim i As Long

    Set hReq = CreateObject("MSXML2.XMLHTTP")
    With hReq
        .Open "GET", "https://www.viathinksoft.com/", False
        .send
    End With
    
    If hReq.status <> 200 Then
        MsgBox ("HTTP Request failed")
        Exit Sub
    End If

    ' split the data into larger pieces
    RespArray() = Split(hReq.responseText, Chr(10))
    x = Replace(x, Chr(13), "")

    ' loop through first array to break it down line by line
    For i = LBound(RespArray) To UBound(RespArray)
        MsgBox (RespArray(i))
    Next i
End Sub
Daniel Marschall
ViaThinkSoft Co-Founder

Feedback? Problems? Please drop us a message!

Your name (optional):

E-mail address (optional):

Message: