Msg to remind to fill in blanks on a certain day of week

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hello
I would like a msgbox to pop up when workbook opens every Friday to remind the user to "fill in blanks"

Regards
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
In the VBA Screen look to double click the item which states ThisWorkBook and then select the first drop down that states General and select Workbook then add this code

Code:
Private Sub Workbook_Open()
If Weekday = 6 Then [COLOR=green]'This is Friday
[/COLOR]MsgBox "Please fill in Blank cells"
End If
End Sub

The VBA Help will guide you using the word Weekday


The firstdayofweek argument has these settings:
<TABLE><TBODY><TR><TH>Constant</TH><TH>Value</TH><TH>Description</TH></TR><TR><TD>vbUseSystem</TD><TD>0</TD><TD>Use the NLS API setting.</TD></TR><TR><TD>vbSunday</TD><TD>1</TD><TD>Sunday (default)</TD></TR><TR><TD>vbMonday</TD><TD>2</TD><TD>Monday</TD></TR><TR><TD>vbTuesday</TD><TD>3</TD><TD>Tuesday</TD></TR><TR><TD>vbWednesday</TD><TD>4</TD><TD>Wednesday</TD></TR><TR><TD>vbThursday</TD><TD>5</TD><TD>Thursday</TD></TR><TR><TD>vbFriday</TD><TD>6</TD><TD>Friday</TD></TR><TR><TD>vbSaturday</TD><TD>7</TD><TD>Saturday</TD></TR></TBODY></TABLE>

Example from Help

Code:
[B]Example[/B]

This example uses the [B]Weekday[/B] function to obtain the day of the week from a specified date.
<TABLE><TBODY><TR><TD>
<CODE>Dim MyDate, MyWeekDayMyDate = #February 12, 1969#    ' Assign a date.MyWeekDay = [B]Weekday([/B]MyDate[B])[/B]    ' MyWeekDay contains 4 because     ' MyDate represents a Wednesday.</CODE></PRE></TD></TR></TBODY></TABLE>
 
Upvote 0
Thank you works a treat!!
Have u got a list for time like what is:
9am
12am
3pm
6pm

Thanks in advance
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,903
Members
452,948
Latest member
Dupuhini

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