`````2个论坛了 望高手看看
比如第一次获取abc字符串得结果5 text3能正常显示出 但网页里变了只有4个
再按Command1 那N变量还是显示5 为何为何为何
以为是释放变量问题 我把代码放到form2
form用Form2.Hide Unload Form2来显示 但还是一样 Public c_str As String, l As Long, tm As String, n As Long 
Public sm As String 
Public h As Object 
Public sp As String Private Sub Command1_Click() 
n = 0
tm = "http://www.xxx.com" Set h = CreateObject("Microsoft.XMLHTTP") 
h.Open "GET", tm, False 
    h.Send 
If h.ReadyState = 4 Then sp = StrConv(h.Responsebody, vbUnicode)   c_str = "abc" 
  l = InStr(sp, c_str) 
  Do While l > 0 
          sp = Right(sp, Len(sp) - l) 
          l = InStr(sp, c_str) 
          n = n + 1  Loop 
Text3.Text = n 
End Sub