Code:'add a timer to your project. Option Explicit Private Sub Command2_Click() Shell "c:\program files\birthday reporter\birthdays.exe", vbNormalFocus 'Reenable the timer Timer1.Enabled = True End Sub Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() Timer1.Enabled = True Timer1.Interval = 60000 'approx 1 min End Sub Private Sub Timer1_Timer() Dim curTime As Date curTime = Format(Now, "hh:mm AMPM") If curTime = "11:00 PM" Then 'disbale the timer and shell my program Timer1.Enabled = False Call Command2_Click End If End Sub




Reply With Quote