我的循环有点问题,试验的时候来是死机,请各位帮忙,问题出在了那里?
Private Sub cmdSend_Click()
Dim mystr As String
mystr = (txtMobileNo.Text)
mystrs = Split(mystr, ",")
Dim i As LongIf chkqunfa.Value = 1 ThenFor i = 0 To UBound(mystrs)
SMS.SendTimeOut = Text1.Text ‘这里是发送延时,请问SMS.sendtimeout 该怎么用啊?请指教 If SMS.SendMsg(mystrs(i), txtmsg.Text, IIf((chkChinese.Value = 1), True, False), IIf((chkReport.Value = 1), True, False)) = 0 Then
MsgBox "发送成功!"
SMS.SendTimeOut = 0
Else
MsgBox "发送失败"
End If
Next i
End If
If SMS.SendMsg(txtMobileNo.Text, IIf((chkChinese.Value = 1), True, False), IIf((chkReport.Value = 1), True, False)) = 0 Then
MsgBox "发送成功!"
Else
MsgBox "发送失败!"
End If
End Sub
Private Sub cmdSend_Click()
Dim mystr As String
mystr = (txtMobileNo.Text)
mystrs = Split(mystr, ",")
Dim i As LongIf chkqunfa.Value = 1 ThenFor i = 0 To UBound(mystrs)
SMS.SendTimeOut = Text1.Text ‘这里是发送延时,请问SMS.sendtimeout 该怎么用啊?请指教 If SMS.SendMsg(mystrs(i), txtmsg.Text, IIf((chkChinese.Value = 1), True, False), IIf((chkReport.Value = 1), True, False)) = 0 Then
MsgBox "发送成功!"
SMS.SendTimeOut = 0
Else
MsgBox "发送失败"
End If
Next i
End If
If SMS.SendMsg(txtMobileNo.Text, IIf((chkChinese.Value = 1), True, False), IIf((chkReport.Value = 1), True, False)) = 0 Then
MsgBox "发送成功!"
Else
MsgBox "发送失败!"
End If
End Sub
把循环改成
For i = lbound(mystrs) To UBound(mystrs)
但是我试验的时候怎么老是死机啊?