如何检测 Outlook 自定义表单上的周末?
How to detect Weekends on Outlook Custom Form?
我说的是 Outlook 自定义表单,而不是 VBA 用户表单。
我使用 olkdatecontrol 工具作为日期选择器。有什么方法可以使用此工具检测周末吗?
我尝试了以下方法。
Sub cmdbutTest_Click
getdate = Item.UserProperties.Find("Start").Value
If(getdate = vbSunday or vbSaturday)then
MsgBox "Date may not start on the weekend"
End If
End Sub
这个对我有用。
从
得到这个
MsgBox Weekday(MyDate, vbMonday) > 5
我说的是 Outlook 自定义表单,而不是 VBA 用户表单。
我使用 olkdatecontrol 工具作为日期选择器。有什么方法可以使用此工具检测周末吗?
我尝试了以下方法。
Sub cmdbutTest_Click
getdate = Item.UserProperties.Find("Start").Value
If(getdate = vbSunday or vbSaturday)then
MsgBox "Date may not start on the weekend"
End If
End Sub
这个对我有用。 从
得到这个MsgBox Weekday(MyDate, vbMonday) > 5