Codes for Reminder creation in Excel VBA
Solved/Closed
Related:
- Reminder in excel pop up
- Hunie pop free - Download - Adult games
- Viber pop up after call - Guide
- Number to words in excel - Guide
- Marksheet in excel - Guide
- How to take screenshot in excel - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Mar 13, 2010 at 11:04 AM
Mar 13, 2010 at 11:04 AM
Design your sheet as
---A -------------- B -------- C ---------------------- D
1- Date ------- Time ------Task ------------------- Remind
2- 13/3/2010 - 11:10 ---- Clean Room -------------- X
3- 13/3/2010 - 11:10 ---- Clean Car ----------------- X
X: indicate the this is an active reminder. Remove x to disable that reminder
On VBE (ALT + F11) and in the project explorer window, double click on "ThisWorkbook". Paste the code below.
Also you need to understand a few things
1. The code needs to be started manually first time. After that till you close the book, it will keep checking the schedule as you have defined in the book
2. Once you close the book and relaunch it, you again have to start the code once more.
3 . To start the code, you would need to go to macro and there is a run button on the menu bar.
4. Now if you don't want to manually run the code, and you want the code to run on its own when ever you start the book, then you have to define a routine called Workbook_Open()
5 So again, If you want to manually run the code then you do exactly as you did before
and if you want to run the code on its own when ever the book is opened, then you need to add one more (you keep the old code though). The code would be
Private Sub Workbook_Open()
Call remindMe
End Sub
---A -------------- B -------- C ---------------------- D
1- Date ------- Time ------Task ------------------- Remind
2- 13/3/2010 - 11:10 ---- Clean Room -------------- X
3- 13/3/2010 - 11:10 ---- Clean Car ----------------- X
X: indicate the this is an active reminder. Remove x to disable that reminder
On VBE (ALT + F11) and in the project explorer window, double click on "ThisWorkbook". Paste the code below.
Private Const reminder As Integer = 1 Private reminderNext As Variant Public Sub remindMe() currentTime = Time nextMin = CDate(Format(Time + 1 / (24 * 60), "hh:mm")) myrows = Range("A1").CurrentRegion.Rows.Count For thisrow = 2 To myrows If (Cells(thisrow, "D") = "X") Then thistime = CDate(CDate(Cells(thisrow, "A")) + Cells(thisrow, "B")) If ((thistime >= Now) And (thistime <= Now + 1 * reminder / (24 * 60))) Then task = task & vbCrLf & Cells(thisrow, "C") & " at " & Format(Cells(thisrow, "B"), "hh:mm") End If End If Next If (task <> "") Then MsgBox task reminderNext = Now + TimeSerial(0, reminder, 0) Application.OnTime reminderNext, "ThisWorkbook.remindMe", , True End Sub
Also you need to understand a few things
1. The code needs to be started manually first time. After that till you close the book, it will keep checking the schedule as you have defined in the book
2. Once you close the book and relaunch it, you again have to start the code once more.
3 . To start the code, you would need to go to macro and there is a run button on the menu bar.
4. Now if you don't want to manually run the code, and you want the code to run on its own when ever you start the book, then you have to define a routine called Workbook_Open()
5 So again, If you want to manually run the code then you do exactly as you did before
and if you want to run the code on its own when ever the book is opened, then you need to add one more (you keep the old code though). The code would be
Private Sub Workbook_Open()
Call remindMe
End Sub
Apr 12, 2010 at 04:22 AM
Apr 12, 2010 at 09:03 AM
May 27, 2010 at 02:42 PM
I realy like to do this plz tell me what m I suppose to do
May 27, 2010 at 03:00 PM
Now for your question. There is no reminder on the taskbar. This issue was some one wanted to have excel running in the background or launched via scheduler. The excel book itself would act as a reminder.
May 27, 2010 at 03:52 PM
I copy and pasted your code exactly as per mention above but it cant work
My step wht I do
1. I copy above code
2. Open the excel and press Alt F11 then VB window open
3. I pasted there the code
4. I saved that excel on desktop
5. and re-open the same excel
6. in A2 I wrote 01/06/1020 (dd/mm/yy) & B2 I wrote 01:10 (night timing that is am)
7. in C2 I wrote My bill due date is today
8. in D2 I wrote X (alphabetical capital letter)
9. I saved this and close the excel
On camputor time comes 01:11 but on task bar there no any reminder (In B2 I wrote 01:10 time)
its not working Plz help