Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
Why not use conditional formatting under the format menu and skip the code.
If not familiar see Debra Dalgleish's site: http://www.contextures.com/tiptech.html -- Regards, Tom Ogilvy "kiran1810" wrote in message ... hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
Kiran, I have a sheet set up for birthdays, if you want to take a look at it
let me know and I will send you a copy -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "kiran1810" wrote in message ... hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
If you want to use code try the following:
1. In cell D1 of your worksheet place the formula =today() 2. Place the following in the workbook open event under "ThisWorkbook" Private Sub Workbook_Open () Dim FriendBDay As Date With Sheets("Sheet1") ''''This assumes that you have the birthdays listed in Column A and your friends' names in column B FriendBDay = Application.WorksheetFunction.VLookup(.Range("D1") , ..Range("A:B"), 2, False) End With If FriendBDay < "#N/A" Then MsgBox "Today is " & FriendBDay & "'s birthday!" End If End Sub This won't work if you have 2 or more friends who share the same birthday as it will only return the first name it finds. "kiran1810" wrote: hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
Think you will get an error if Vlookup fails. Have you tested this? It
worked for you when .Range("D1") was not found in column A? -- Regards, Tom Ogilvy "JNW" wrote in message ... If you want to use code try the following: 1. In cell D1 of your worksheet place the formula =today() 2. Place the following in the workbook open event under "ThisWorkbook" Private Sub Workbook_Open () Dim FriendBDay As Date With Sheets("Sheet1") ''''This assumes that you have the birthdays listed in Column A and your friends' names in column B FriendBDay = Application.WorksheetFunction.VLookup(.Range("D1") , .Range("A:B"), 2, False) End With If FriendBDay < "#N/A" Then MsgBox "Today is " & FriendBDay & "'s birthday!" End If End Sub This won't work if you have 2 or more friends who share the same birthday as it will only return the first name it finds. "kiran1810" wrote: hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
wish to make a Birthday reminder!!
Hadn't thought about that...
Thanks "Tom Ogilvy" wrote: Think you will get an error if Vlookup fails. Have you tested this? It worked for you when .Range("D1") was not found in column A? -- Regards, Tom Ogilvy "JNW" wrote in message ... If you want to use code try the following: 1. In cell D1 of your worksheet place the formula =today() 2. Place the following in the workbook open event under "ThisWorkbook" Private Sub Workbook_Open () Dim FriendBDay As Date With Sheets("Sheet1") ''''This assumes that you have the birthdays listed in Column A and your friends' names in column B FriendBDay = Application.WorksheetFunction.VLookup(.Range("D1") , .Range("A:B"), 2, False) End With If FriendBDay < "#N/A" Then MsgBox "Today is " & FriendBDay & "'s birthday!" End If End Sub This won't work if you have 2 or more friends who share the same birthday as it will only return the first name it finds. "kiran1810" wrote: hello all, I am new to Excel programming. and as a start I wished to create a Bday reminder where in one worksheet I will have all my friends names and against them I will have their Birthdays written in DD-MM format. I tried to write a VBA code to pick the date from the worksheet and check it with the curent Date. this was the logic I thought to use. But unfortunately I could retrieve the present date using NOW()..... can anyone help me or suggest me any code model for this kind of application? thanks in advance... reagrds, satya. -- kiran1810 ------------------------------------------------------------------------ kiran1810's Profile: http://www.excelforum.com/member.php...o&userid=27783 View this thread: http://www.excelforum.com/showthread...hreadid=472948 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Birthday List | Excel Discussion (Misc queries) | |||
Birthday Calculations | Excel Worksheet Functions | |||
Birthday calculations | Excel Discussion (Misc queries) | |||
Can I make some thing happen if I get a "reminder" | Excel Programming | |||
make appointment in outlook and send email reminder - all data in excel 2000 | Excel Programming |