Home > Software engineering >  Help: I want to ask next my this application should do this every 3 minutes, not really. Can you tel
Help: I want to ask next my this application should do this every 3 minutes, not really. Can you tel

Time:09-16

Private Sub Application_ItemSend (ByVal Item As Object, Cancel the As Boolean)

Dim CNN As New ADODB. Connection
Dim the rs As the ADODB library you

Lianjie="Provider=Microsoft. Jet. The OLEDB. 4.0. Extended Properties='Excel 8.0; HDR=yes; '; The Data Source=C: \ Eva Yu \ A.x ls
"
CNN. Open lianjie

St="select attachment from [sheet1 $] where email='" & amp; Item. The To & amp; "'
"
Set the rs=CNN. The Execute (st)

If Not (IsNull (rs (" attachment "))) Then

Item. Attachments. The Add (rs (" attachment "))

End the If

Rs. Close

CNN. Close

Application. Wait (Now + TimeValue (" 00:03:00 "))

End Sub

CodePudding user response:

Application. Wait (Now + TimeValue (" 00:03:00 "))

This sentence, first check documents, understand the wait is refers to the "wait for a period of time" or "wait until a point in time"

CodePudding user response:

Application. The OnTime

CodePudding user response:

Why not use a timer or while true death cycle
  • Related