View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default can i create a reminder to pop up in excel?

hi
If you don't have a user form, you can use a standard message box.
this code assumes that you have a personal workbook that opens with excel
and that you have a date in B2 and a remider text in C2.
Private Sub Workbook_Open()

Dim dat1 As Date
Dim dat2 As Date
Dim dat3 As Long
Dim msg As String
Dim msg2 As String

msg = Workbooks("personal.xls").Sheets("sheet1").Range(" C2").Value
dat1 = Workbooks("personal.xls").Sheets("sheet1").Range(" B2").Value
dat2 = Date
dat3 = dat1 - dat2
'MsgBox Format(dat1, "m/d/yy")

If Not IsEmpty(Workbooks("personal").Sheets("sheet1").Ran ge("B2")) Then

If Date < dat1 Then
MsgBox (msg & vbNewLine & _
"That is on " & dat1 & vbNewLine & _
" or " & dat3 & " days from now.")
End If
Else
Exit Sub
End If
End Sub


"NickHK" wrote:

Where is the appointment date ?
In a workbook ?
Assuming you have a suitable userform with a label:

Private Sub Workbook_Open()
Dim AppointDate As Date

AppointDate = Worksheets(1).Range("A1")

If DateDiff("d", Date, AppointDate) < 2.5 Then
With UserForm1
.Label1.Caption = "You have an appointment on:" & vbNewLine &
Format(AppointDate, "Long date")
.Show vbModeless
End With
End If
End Sub

NickHK

"Leeo" wrote in message
...
I want to set up a reminder in excel, this reminder must pop up 2 days

before
my appointment.

I know you can do this in outlook but i was wondering if it is possible in
excel?