vba - 如何在 Outlook 自定义表单上检测周末?
问题描述
我说的是 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
解决方案
这个对我有用。从https://stackoverflow.com/a/33115260/10711853得到这个
MsgBox Weekday(MyDate, vbMonday) > 5
推荐阅读
- javascript - 如何在 Ubuntu 18.04 中使用 Xcode?
- python - 如何在 Python 中序列化用户定义的函数
- javascript - 使用jsPDF下载PDF后文本右对齐不起作用
- html - 如何在不使用滤镜的情况下使图像变暗?
- javascript - 如何在 React-Native 上分析网络?
- c++ - C ++:获取内存分配错误的SIGCONT错误
- validation - 验证集的指标很奇怪
- javascript - 欧拉计划 #32:为什么我的答案是错误的?
- html - 带有正则表达式的 html+input 类型文本不带下划线(_)和特殊字符
- python - matplotlib 中的重叠图