如此 如果月中的任何一天都是工作日。 读/写 Boolean。
语法
expression。 Working
表达 一个代表 Month 对象的变量。
示例
对于活动项目的“学生”组中的资源,下面的示例将六月、七月和八月设为非工作月。
Sub GiveStudentsSummerOff()
Dim R As Resource ' Resource object used in For Each loop
Dim Y As Year ' Year object used in For Each loop
' Look for resources in the "Student" group of the active project.
For Each R In ActiveProject.Resources
' Give the summer off to resources in the "Student" group.
If R.Group = "Student" Then
For Each Y In R.Calendar.Years
Y.Months("June").Working = False
Y.Months("July").Working = False
Y.Months("August").Working = False
Next Y
End If
Next R
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。