Reminder in Excel 97

  • Thread starter Thread starter xswoosh
  • Start date Start date
X

xswoosh

hie guys, just started Excel programming & I could use some help from
you gurus

I'm creating a reminder using excel & basically I'll input the dates &
events in the sheets. At the moment, I'm stuck in playing with the
DATES.
I'm placing my dates on A1 & events on B1

What I would like to do is:


With worksheets("Sheet1")
if range("A1").value = date then
msgbox("Please do this:" range("B2"))
else
msgbox("Pending")
endif
end with


I've linked this macro to a button, but whenever I press the button, it
will only display "Pending" although I've set the date of the events to
the current date!!

Please help!!

Thanks & Regards,
Xswoosh
 
Hi

You say you're placing dates on A1 and events on B1, but
you have B2 in your code?

Anyhow try this:

Private Sub CommandButton1_Click()
With Worksheets("Sheet1")
If Range("A1")= Date Then
MsgBox "Please do this: " & Range("B1")
Else
MsgBox "Pending"
End If
End With
End Sub

Libby
 
thx, i got it working in the end!! :p
anyway, what code do i use if i want to do the followings:

After clicking a button, it will automatically browse thru all m
reminders & those that are still pending will be bold in red. If thos
that are expired will go to black. ATM, i only know how to search
edit for one reminder, but I don't know how to do for more than
reminders....Below is my code for *one reminder*:

With worksheets("Reminder-Nov")
if range("B3") <= date then
range("B3:M3").font.colorindex = 3
range("B3:M3").font.bold = true
endif
end with


thanks & regards,
xswoos
 
for i = 1 to Cells(Rows.Count, "A").End(xlUp).Row step 1
With worksheets("Reminder-Nov")
if range("B" & i ) <= date then
range("B" & i & ":M" & i").font.colorindex = 3
range("B" & i & ":M" & i").font.bold = true
end if
end with
next
 
mudraker, unfortunately, nothing happened after I inserted ur cod
inside. But I did change one line in ur code which is
FOR I = 1 TO CELLS(ROWS.COUNT, \"A\").END(XLUP).ROW STEP
to
*For i = .UsedRange.Rows.Count To 3 Step -1*
and it is working fine now, thanks!!

But i was wondering whether there is a way to count from top to th
bottom last used row instead?? Plz help!!! :
 
range("a1").End(xldown).Row
range("a1").End(End(xlToRight)).column
range("c1").End(End(xlToLeft)).colum
 
Back
Top