Prompt message when workbook is opened on particular date

hocs

New Member
Joined
Nov 13, 2009
Messages
33
Hi, i would like to have message prompted to reming user doing backup whenever the workbook is opened from 28 til the last day of the month (30th or 31st depending on which month). wha's the correct code for "date"?

Private Sub Workbook_open()
If Date>=28 Then
Msg = "Remember to do monthly backup!"
MsgBox Msg, vbInformation
End If
End Sub

What's the correct way to express Date>=28 above?
Thanks!
 
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()<br>    <br>    <SPAN style="color:#00007F">If</SPAN> Day(Date) >= 28 <SPAN style="color:#00007F">Then</SPAN><br>        MsgBox "Yo, rent is due!!!"<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>

Hope that helps,

Mark
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top