I have n button that executes the application obviously, but what I want to do is set a timer so that the timer
execute the application every 15 minutes so I don’t know how to link the command button to the timer if it is possible
Code:
Private Sub cmdstart_Click()
If lblMsgA >= 1000 Then
Dim oleasApp As Outlook.Application
Set oleasApp = CreateObject("Outlook.Application")
Dim oleasNs As Outlook.Namespace
Set oleasNs = oleasApp.GetNamespace("MAPI")
oleasNs.Logon
Dim oleasMail As Outlook.MailItem
Set oleasMail = oleasApp.CreateItem(oleasMailItem)
MsgBox "All done...", vbMsgBoxSetForeground
oleasNs.Logoff
Set oleasNs = Nothing
Set oleasMail = Nothing
Set oleasApp = Nothing
End If
‘Timer’
Dim MinCount As Integer()
Sub tmrMinute_Timer()
MinCount = MinCount + 1
If (MinCount = 15) Then
cmdstart ( DON’T KNOW THIS PART CAN IT BE DONE like this..
MinCount = 0
End If
End Sub
MsgBox "All done...", vbMsgBoxSetForeground
oleasNs.Logoff
Set oleasNs = Nothing
Set oleasMail = Nothing
Set oleasApp = Nothing
End If
End Sub
Sub tmrMinute_Timer()
'§ set timer1 Interval=min. => 60000 millisec. !!
MinCount = MinCount + 1
'§ as temporary control
Label1.Caption = MinCount
If (MinCount = 15) Then
Call cmdstart_Click
MinCount = 0
End If
End Sub
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.