start dialogbox popup once excel open

V

victorlinet

Hi, I need to develop a dialog box notification so that when user ope
my excel database, it will check a particular cell (for a certai
workweek or date) and if condition meet, it will popup a notificatio
for the task to do.
Your help is much appreciated.
Thank you
 
F

Frank Kabel

Hi
try the following macro (put it in ypur workbook module - not in a
standard module):

Private Sub Workbook_Open()
Dim wks as worksheet
dim test_date as date

set wks = me.worksheets("sheet1")
test_date=wks.range("A1").value

if test_date < date then
msgbox "Check cell A1 - it's older than today"
end if

End Sub
 
Top