• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Creating an alert in excel

Tanu

New Member
Hi guys, Can u please tell me how to create an alert in excel which pops up automatically every year to remind us that something needs to be renewed for exapmle licence
 
Hi Tanu ,


You can use the following macro ( this is from another website , I forget which ) :


Private Sub Workbook_Open()

Due_date = #1/15/2012# 'January 15 , 2012 is the due date for renewing your licence

Todays_date = Date

Select Case (Due_date - Todays_date)

Case Is < 15: MsgBox "You have just 15 days to renew your licence", vbExclamation + vbOKOnly

Case Is < 45: MsgBox "You have 45 days to renew your licence", vbOKOnly

End Select

End Sub


Note that this code has to be in the ThisWorkbook object , in order to run.


Narayan
 
Back
Top