定时检测网络状态
已有 171 次阅读2008-1-29 12:58
|个人分类:VBA
Private Sub Form_Timer()
On Error GoTo Err_Form_Timer
Dim CONNDL As New ADODB.Connection
Set CONNDL = CurrentProject.Connection
Dim RSTDL As New ADODB.Recordset
RSTDL.Open "SELECT * FROM 自动登录", CONNDL, adOpenKeyset, adLockOptimistic
Exit_Form_Timer:
Exit Sub
Err_Form_Timer:
MsgBox "与服务器断开,点击确定后将与服务器进行自动连接", vbOKOnly + vbInformation, "提示"
Call auto
Resume Exit_Form_Timer
End Sub