LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Workbook reminder

Hii All,
I tried to make a reminder inside the workbook which works every
minute OnTime method(subject to change of course). Everything works
properly except, if I work with more than one workbook, gives an error
which I understand why. I tried to prevent calling OnTime macro by
activating the workbook that worked fine too. but the problem, the
workbook name which i have reminder changes every day. Is there any
other way to triger
Thanks in advance.
OnTime macro correctly? Here are my codes:

Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:01:00"), "Remember"
wbkName = Sheets("Reminder").Range("WbkName")
'Windows(wbkName).Activate
End Sub
Public TrdDate As Date

Sub Remember()
Dim wbkName As Variant
'wbkName = Sheets("Reminder").Range("WbkName")
'Windows(wbkName).Activate
TrdDate = Now + TimeValue("00:01:00")
Application.OnTime TrtDate, "Remember"
CheckReminder
End Sub

Sub CheckReminder()
Dim cel As Range
Dim MyDate As Date
MyDate = Now()
Dim Prompt, Buttons, Title, Help, Ctxt, Response, MyString
Buttons = vbYesNo + vbCritical + vbDefaultButton1
Title = "CALLING FOR REMINDER"
For Each cel In Sheets("Reminder").Range("G:G")
Prompt = "There is a reminder about: " & Chr(13) _
& " { " & cel.Text & " }" & " on " & cel.Offset(0, 1) & " at " &
Format(cel.Offset(0, 2), "HH:MM") _
& Chr(13) _
& "Please Click YES to Dismiss , Click NO to Snooze"
If cel < "" And cel.Offset(0, 3) = "" _
And Format(cel.Offset(0, 1).Value, "DD-MMM-YY") = Format(MyDate, "DD-
MMM-YY") _
And Format(cel.Offset(0, 2).Value, "HH") = Format(MyDate, "HH") Then
Response = MsgBox(Prompt, Buttons, Title, Help, Ctxt)
If Response = vbYes Then
GoTo 20
Else: GoTo 30
End If
20 cel.Offset(0, 3) = "dismissed"
End If
30 Next cel
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reminder Misho Excel Discussion (Misc queries) 0 October 10th 09 03:28 PM
Pop Reminder tmdrake Excel Programming 2 April 16th 08 11:55 PM
Reminder horseman Excel Discussion (Misc queries) 1 September 24th 07 04:34 PM
pop up box reminder laidebug Excel Discussion (Misc queries) 2 August 10th 07 05:40 PM
can i have a pop up reminder message when i open a workbook? j jones New Users to Excel 2 November 16th 05 08:07 PM


All times are GMT +1. The time now is 04:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"