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" <JNW@discussions.microsoft.com> wrote in message
> news:D01C0123-9C01-459F-8699-1186901204A2@microsoft.com...
> > 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
> > >
> > >
>
>
>
Bookmarks