首页 > 电脑

运行到open就出现对象变量或with块变量未设置,请大神们帮忙看看,谢谢。

更新时间2019-01-16 12:07:02

Public Sub g()

Dim xh As xmlhttp

Dim s As String

With xh

    .Open "Get", "https://www.baidu.com/s?wd=您好", False

    .send

    Do While .readyState <> 4

     DoEvents

    Loop

    s = .responseText

 

End With

    Debug.Print s

End Sub

运行到open就出现对象变量或with块变量未设置,请大神们帮忙看看,谢谢

你的是VBA/VBS/VB.net?

可能的问题是你的xmlhttp没有被定义(程序是参考别人的,但没有参考完整)

相关标签:谢谢大神

上一篇:鲁大师61万分的显卡大概多少钱

下一篇:你好,能帮忙修改下么?