激发COMMAND2

来源:百度知道 编辑:UC知道 时间:2024/07/03 02:14:53
Private Sub Text2_Change()
Dim t_This As Integer '保存当前查找的位置
le = Len(Text5.Text)
le2 = Len(Text3.Text)
t_This = 1
Do While Not t_This = 0
t_This = InStr(t_This + le, Text2.Text, Text5.Text)
If t_This <> 0 Then
If InStr(Text3, Mid(Text2, t_This + le, InStr(t_This, Text2, vbCrLf) - t_This - le)) <= 0 Then
Text3 = Text3 & Mid(Text2, t_This + le, InStr(t_This, Text2, vbCrLf) - t_This - le) & "@yahoo.com.tw" & vbCrLf
End If
ElseIf le2 > 1000 Then
Open App.Path & "\需要的用户.txt" For Append As #1 '打开文件
Print #1, Text3 '写入文本
Close #1 '关闭文件
If le2 > 1000 Then
Text3 = Clear
End If
End If
Loop
End Sub

把call command2_click加在end sub之前呗
=========新近回答=============
我想应该是网页加载的速度慢于本地代码执行的速率所致.你可以在CALL COMMAND2_CLICK 之后加sleep()试试(API),控制一下循环过程.

是啊.在需要的地方添加一行
call command2_click
不就行了吗?