View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default MsgBox containing text from cell

Something like:

If Range("A1").Value = Format(Now, "ddd") Then
MsgBox "x"
End If

No need to refer to a cell with Today in it as VBA knows the current date.
You'd have to use "Thu" for Thurday but the rest are obvious.

--
Jim
"Nick Smith" wrote in message
...
| Folks,
|
| Struggling with the MsgBox function.
|
| I want a MsgBox to come up when it is the day a report is due. I have
| defined the report title in one cell and the due day in another cell, eg
| ThisWorkbook.Sheets("Instructions").Cell C29 contains "Status Report" and
| ThisWorkbook.Sheets("Instructions").cell F29 contains "Wed". I want the
| message to read "Reminder.... Project Status Report due today" with an OK
| button to acknowledge when it is the day the report is due.
| ThisWorkbook.Sheets("Instructions").Cell B1 contains the today() function
to
| define today's date.
|
| However, if Cell C29 is empty, then no MsgBox should appear at all. That
is
| to say that the reminders are essentially user defined.
|
| Was thinking along the lines of:
|
| Private Sub ReminderMessageOnOpening()
| If ThisWorkbook.Sheets("Instructions").Cells("C29") < "" Then
| If ThisWorkbook.Sheets("Instructions").Cells("F29") =
| ThisWorkbook.Sheets
| ("Instructions").B1 Then
| MsgBox("Reminder.... Project" &C29 "due" today)
| End If
| End If
| End Sub
|
| Can anyone help please as I am struggling with this one.
|
| Thanks in advance,
|
| Nick
|