Declare Function CreateThreadL Lib "kernel32" Alias "CreateThread" _
    (ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, _
    ByVal lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As LongPublic Sub Start_Click()
    'run the process of analyzing in a new thread
    Dim tId As Long, hThread As Long
    hThread = CreateThreadL(0, 0, AddressOf DurativeFunc, 0, 0, tId)
End Sub
Function DurativeFunc(ByVal lpvThreadParm As Long) As Long
    Dim dwResult As Long
    dwResult = 0
    For i = 1 To 10
    Dim x As New MSXML2.XMLHTTP
    x.open "get", "http://www.webasp.net/about/gywm.asp", False
    x.send    form1.Text1.Text = Mid(StrConv(x.responseBody, vbUnicode), 1, 100)    Next
    DurativeFunc = dwResult
End Function
以上代码在测试运行的时候提示自动化错误 错误行为 x.open "get", "http://www.webasp.net/about/gywm.asp", False但是可以正常编译,编译后运行还是会出错,我用一个普通循环测试线程却没有任何错误!!郁闷中。请大虾们帮忙!