True 是表示 如果在月份中的任何一天為工作日的工作。 可讀寫的 Boolean。
語法
expression。 Working
詞 一個代表 Month 物件的變數。
範例
下面範例將六月、七月和八月設為使用中專案 "Student" 群組中所有資源的非工作月份。
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 支援與意見反應。