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 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>
[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>