求助,如何将网络文本改写到 Text1.Text中显示
以下是改写到excel中的代码,我想直接改写到vb窗体的Text1.Text中显示,在此求助。Private Sub Command1_Click()
Dim tmp() As String, num() As String, xmlhttp As Object
Dim r As Long, l As Long, c As Integer
Dim rnum
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
With xmlhttp
.Open "get", "http://www., False
.send
tmp = Split(.responsetext, Chr(10))
End With
l = UBound(tmp)
Chr (10)
ReDim num(0 To l, 0 To 16) As String
For r = 0 To l
rnum = Split(tmp(r), " ")
For c = 0 To UBound(rnum)
num(r, c) = rnum(c)
Next
Next
Range("a2:e" & l).Value2 = num
Erase rnum
End
Erase tmp
Erase num
Set xmlhttp = Nothing
End Sub